Home
last modified time | relevance | path

Searched refs:pbuf (Results 1 – 14 of 14) sorted by relevance

/Zephyr-latest/include/zephyr/ipc/
Dpbuf.h96 struct pbuf { struct
156 static struct pbuf name = { \
174 int pbuf_tx_init(struct pbuf *pb);
190 int pbuf_rx_init(struct pbuf *pb);
206 int pbuf_write(struct pbuf *pb, const char *buf, uint16_t len);
224 int pbuf_read(struct pbuf *pb, char *buf, uint16_t len);
Dicmsg.h42 struct pbuf *tx_pb;
43 struct pbuf *rx_pb;
/Zephyr-latest/drivers/eeprom/
Deeprom_stm32.c29 uint8_t *pbuf = buf; in eeprom_stm32_read() local
43 *pbuf = *(__IO uint8_t*)(config->addr + offset); in eeprom_stm32_read()
45 pbuf++; in eeprom_stm32_read()
59 const uint8_t *pbuf = buf; in eeprom_stm32_write() local
78 config->addr + offset, *pbuf); in eeprom_stm32_write()
86 pbuf++; in eeprom_stm32_write()
Deeprom_at2x.c96 uint8_t *pbuf = buf; in eeprom_at2x_read() local
110 ret = config->read_fn(dev, offset, pbuf, len); in eeprom_at2x_read()
117 pbuf += ret; in eeprom_at2x_read()
155 const uint8_t *pbuf = buf; in eeprom_at2x_write() local
184 ret = config->write_fn(dev, offset, pbuf, len); in eeprom_at2x_write()
194 pbuf += ret; in eeprom_at2x_write()
/Zephyr-latest/subsys/modbus/
Dmodbus_serial.c172 static uint8_t *modbus_ascii_bin2hex(uint8_t value, uint8_t *pbuf) in modbus_ascii_bin2hex() argument
177 hex2char(u_nibble, pbuf); in modbus_ascii_bin2hex()
178 pbuf++; in modbus_ascii_bin2hex()
179 hex2char(l_nibble, pbuf); in modbus_ascii_bin2hex()
180 pbuf++; in modbus_ascii_bin2hex()
182 return pbuf; in modbus_ascii_bin2hex()
190 uint8_t *pbuf; in modbus_ascii_tx_adu() local
196 pbuf = &cfg->uart_buf[1]; in modbus_ascii_tx_adu()
197 pbuf = modbus_ascii_bin2hex(ctx->tx_adu.unit_id, pbuf); in modbus_ascii_tx_adu()
199 pbuf = modbus_ascii_bin2hex(ctx->tx_adu.fc, pbuf); in modbus_ascii_tx_adu()
[all …]
/Zephyr-latest/tests/subsys/ipc/pbuf/src/
Dmain.c20 static void print_pbuf_info(struct pbuf *pb) in print_pbuf_info()
53 static struct pbuf pb = { in ZTEST()
122 static struct pbuf pb0 = { in ZTEST()
126 static struct pbuf pb1 = { in ZTEST()
130 static struct pbuf pb2 = { in ZTEST()
191 struct pbuf *pbuf; member
217 len = pbuf_read(ctx->pbuf, buf, (uint16_t)sizeof(buf)); in stress_read()
245 int ret = pbuf_write(ctx->pbuf, buf, len); in stress_write()
273 static struct pbuf pb = { in ZTEST()
278 ctx.pbuf = &pb; in ZTEST()
/Zephyr-latest/subsys/logging/frontends/
Dlog_frontend_stmesp_demux.c61 struct mpsc_pbuf_buffer pbuf; member
169 mpsc_pbuf_init(&demux.pbuf, &pbuf_config); in log_frontend_stmesp_demux_init()
276 mpsc_pbuf_put_data(&demux.pbuf, (const uint32_t *)&packet, wlen); in store_turbo_log0()
293 mpsc_pbuf_put_data(&demux.pbuf, (const uint32_t *)&packet, wlen); in store_turbo_log1()
308 mpsc_pbuf_put_data(&demux.pbuf, (const uint32_t *)&packet, wlen); in store_tracepoint()
320 mpsc_pbuf_put_data(&demux.pbuf, (const uint32_t *)&packet, wlen); in log_frontend_stmesp_demux_hw_event()
341 mpsc_pbuf_commit(&demux.pbuf, p.generic); in garbage_collector()
486 p.generic = mpsc_pbuf_alloc(&demux.pbuf, wlen, K_NO_WAIT); in log_frontend_stmesp_demux_packet_start()
546 mpsc_pbuf_commit(&demux.pbuf, p.generic); in log_frontend_stmesp_demux_packet_end()
567 while ((p.rgeneric = mpsc_pbuf_claim(&demux.pbuf)) != NULL) { in log_frontend_stmesp_demux_claim()
[all …]
/Zephyr-latest/tests/lib/ringbuffer/src/
Dmain.c162 static struct ring_buf ringbuf, *pbuf; variable
182 int ret = ring_buf_item_put(pbuf, static_data[index].type, static_data[index].value, in tringbuf_put()
196 ret = ring_buf_item_get(pbuf, &type, &value, rx_data, &size32); in tringbuf_get()
211 ret = ring_buf_item_get(pbuf, &type, &value, NULL, &size32); in tringbuf_get_discard()
282 pbuf = &ringbuf; in ZTEST()
289 zassert_false(ring_buf_is_empty(pbuf)); in ZTEST()
291 zassert_true(ring_buf_is_empty(pbuf)); in ZTEST()
297 pbuf = &ringbuf; in ZTEST()
303 zassert_false(ring_buf_is_empty(pbuf)); in ZTEST()
305 zassert_true(ring_buf_is_empty(pbuf)); in ZTEST()
[all …]
/Zephyr-latest/subsys/ipc/ipc_service/lib/
Dpbuf.c62 void pbuf_native_addr_remap(struct pbuf *pb) in pbuf_native_addr_remap()
70 int pbuf_tx_init(struct pbuf *pb) in pbuf_tx_init()
96 int pbuf_rx_init(struct pbuf *pb) in pbuf_rx_init()
112 int pbuf_write(struct pbuf *pb, const char *data, uint16_t len) in pbuf_write()
179 int pbuf_read(struct pbuf *pb, char *buf, uint16_t len) in pbuf_read()
DCMakeLists.txt7 zephyr_sources_ifdef(CONFIG_PBUF pbuf.c)
/Zephyr-latest/tests/lib/spsc_pbuf/src/
Dmain.c415 struct spsc_pbuf *pbuf; member
430 len = spsc_pbuf_read(ctx->pbuf, buf, (uint16_t)sizeof(buf)); in stress_read()
457 if (spsc_pbuf_write(ctx->pbuf, buf, len) == len) { in stress_write()
473 ctx.pbuf = spsc_pbuf_init(buffer, sizeof(buffer), 0); in ZTEST()
474 ctx.capacity = spsc_pbuf_capacity(ctx.pbuf); in ZTEST()
496 len = spsc_pbuf_claim(ctx->pbuf, &buf); in stress_claim_free()
504 spsc_pbuf_free(ctx->pbuf, len); in stress_claim_free()
522 err = spsc_pbuf_alloc(ctx->pbuf, len, &buf); in stress_alloc_commit()
530 spsc_pbuf_commit(ctx->pbuf, len); in stress_alloc_commit()
545 ctx.pbuf = spsc_pbuf_init(buffer, sizeof(buffer), 0); in ZTEST()
[all …]
/Zephyr-latest/lib/os/
Dspsc_pbuf.c230 char *pbuf; in spsc_pbuf_write() local
237 outlen = spsc_pbuf_alloc(pb, len, &pbuf); in spsc_pbuf_write()
242 memcpy(pbuf, buf, len); in spsc_pbuf_write()
/Zephyr-latest/subsys/fs/nvs/
Dnvs.c185 uint8_t *data8 = (uint8_t *)data, buf[NVS_BLOCK_SIZE + NVS_DATA_CRC_SIZE], *pbuf; in nvs_flash_data_wrt() local
201 pbuf = buf; in nvs_flash_data_wrt()
203 memcpy(pbuf, data8, len); in nvs_flash_data_wrt()
204 pbuf += len; in nvs_flash_data_wrt()
209 memcpy(pbuf, &data_crc, sizeof(data_crc)); in nvs_flash_data_wrt()
/Zephyr-latest/drivers/spi/
Dspi_mcux_dspi.c233 uint32_t *pbuf = data->inner_tx_buffer->buf; in mcux_init_inner_buffer_with_cmd() local
245 *pbuf = command | dummy; in mcux_init_inner_buffer_with_cmd()
246 pbuf++; in mcux_init_inner_buffer_with_cmd()