/Zephyr-latest/drivers/console/ |
D | uart_mcumgr.c | 45 struct uart_mcumgr_rx_buf *rx_buf; in uart_mcumgr_alloc_rx_buf() local 54 rx_buf = block; in uart_mcumgr_alloc_rx_buf() 55 rx_buf->length = 0; in uart_mcumgr_alloc_rx_buf() 56 return rx_buf; in uart_mcumgr_alloc_rx_buf() 59 void uart_mcumgr_free_rx_buf(struct uart_mcumgr_rx_buf *rx_buf) in uart_mcumgr_free_rx_buf() argument 63 block = rx_buf; in uart_mcumgr_free_rx_buf() 86 struct uart_mcumgr_rx_buf *rx_buf; in uart_mcumgr_rx_byte() local 98 rx_buf = uart_mcumgr_cur_buf; in uart_mcumgr_rx_byte() 100 if (rx_buf->length >= sizeof(rx_buf->data)) { in uart_mcumgr_rx_byte() 106 rx_buf->data[rx_buf->length++] = byte; in uart_mcumgr_rx_byte() [all …]
|
/Zephyr-latest/tests/net/socket/tls/src/ |
D | main.c | 186 char rx_buf[1]; in test_eof() local 190 recved = zsock_recv(sock, rx_buf, sizeof(rx_buf), 0); in test_eof() 194 recved = zsock_recv(sock, rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in test_eof() 199 recved = zsock_recv(sock, rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in test_eof() 361 uint8_t rx_buf; in test_prepare_dtls_connection() local 404 ret = zsock_recv(s_sock, &rx_buf, sizeof(rx_buf), 0); in test_prepare_dtls_connection() 405 zassert_equal(ret, sizeof(rx_buf), "recv() failed"); in test_prepare_dtls_connection() 416 uint8_t rx_buf[sizeof(TEST_STR_SMALL) - 1] = { 0 }; in ZTEST() local 428 test_data.retries = sizeof(rx_buf); in ZTEST() 434 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), ZSOCK_MSG_WAITALL); in ZTEST() [all …]
|
/Zephyr-latest/subsys/mgmt/mcumgr/transport/src/ |
D | smp_uart.c | 41 static void smp_uart_process_frag(struct uart_mcumgr_rx_buf *rx_buf) in smp_uart_process_frag() argument 49 rx_buf->data, rx_buf->length); in smp_uart_process_frag() 52 uart_mcumgr_free_rx_buf(rx_buf); in smp_uart_process_frag() 64 struct uart_mcumgr_rx_buf *rx_buf; in smp_uart_process_rx_queue() local 66 while ((rx_buf = k_fifo_get(&smp_uart_rx_fifo, K_NO_WAIT)) != NULL) { in smp_uart_process_rx_queue() 67 smp_uart_process_frag(rx_buf); in smp_uart_process_rx_queue() 75 static void smp_uart_rx_frag(struct uart_mcumgr_rx_buf *rx_buf) in smp_uart_rx_frag() argument 77 k_fifo_put(&smp_uart_rx_fifo, rx_buf); in smp_uart_rx_frag()
|
D | smp_dummy.c | 59 static void dummy_mcumgr_free_rx_buf(struct uart_mcumgr_rx_buf *rx_buf); 90 static void smp_dummy_process_frag(struct uart_mcumgr_rx_buf *rx_buf) in smp_dummy_process_frag() argument 98 rx_buf->data, rx_buf->length); in smp_dummy_process_frag() 101 dummy_mcumgr_free_rx_buf(rx_buf); in smp_dummy_process_frag() 131 struct uart_mcumgr_rx_buf *rx_buf; in smp_dummy_process_rx_queue() local 133 while ((rx_buf = k_fifo_get(&smp_dummy_rx_fifo, K_NO_WAIT)) != NULL) { in smp_dummy_process_rx_queue() 134 smp_dummy_process_frag(rx_buf); in smp_dummy_process_rx_queue() 147 static void smp_dummy_rx_frag(struct uart_mcumgr_rx_buf *rx_buf) in smp_dummy_rx_frag() argument 149 k_fifo_put(&smp_dummy_rx_fifo, rx_buf); in smp_dummy_rx_frag() 210 struct uart_mcumgr_rx_buf *rx_buf; in dummy_mcumgr_alloc_rx_buf() local [all …]
|
/Zephyr-latest/tests/drivers/mipi_dsi/api/src/ |
D | main.c | 24 uint8_t rx_buf[2]; in ZTEST() local 37 memset(rx_buf, 0, sizeof(rx_buf)); in ZTEST() 40 ret = mipi_dsi_generic_read(mipi_dev, CONFIG_MIPI_DSI_TEST_CHANNEL, param, 1, rx_buf, 2); in ZTEST() 53 uint8_t rx_buf[2]; in ZTEST() local 66 memset(rx_buf, 0, sizeof(rx_buf)); in ZTEST() 70 MIPI_DCS_GET_DISPLAY_BRIGHTNESS, rx_buf, 2); in ZTEST()
|
/Zephyr-latest/samples/subsys/zbus/remote_mock/src/ |
D | mock_proxy.c | 92 static void decode_sentence(struct net_buf_simple *rx_buf) in decode_sentence() argument 94 if (rx_buf->len <= 1) { in decode_sentence() 102 if ('$' == net_buf_simple_pull_u8(rx_buf)) { in decode_sentence() 105 const struct zbus_channel *chan = decoder(net_buf_simple_pull_u8(rx_buf)); in decode_sentence() 111 net_buf_simple_pull_mem(rx_buf, zbus_chan_msg_size(chan)), in decode_sentence() 124 net_buf_simple_init(rx_buf, 0); in decode_sentence() 133 struct net_buf_simple *rx_buf = NET_BUF_SIMPLE(64); in mock_proxy_rx_thread() local 135 net_buf_simple_init(rx_buf, 0); in mock_proxy_rx_thread() 143 decode_sentence(rx_buf); in mock_proxy_rx_thread() 145 net_buf_simple_add_u8(rx_buf, byte); in mock_proxy_rx_thread()
|
/Zephyr-latest/drivers/spi/ |
D | spi_litex_common.h | 50 static inline void litex_spi_rx_put(uint8_t len, uint32_t *rxd, uint8_t *rx_buf) in litex_spi_rx_put() argument 54 sys_put_be32(*rxd, rx_buf); in litex_spi_rx_put() 57 sys_put_be24(*rxd, rx_buf); in litex_spi_rx_put() 60 sys_put_be16(*rxd, rx_buf); in litex_spi_rx_put() 63 *rx_buf = *rxd; in litex_spi_rx_put()
|
D | spi_rtio.c | 43 struct spi_buf rx_buf = {0}; in spi_rtio_iodev_default_submit_sync() local 45 .buffers = &rx_buf, in spi_rtio_iodev_default_submit_sync() 52 rx_buf.buf = sqe->rx.buf; in spi_rtio_iodev_default_submit_sync() 53 rx_buf.len = sqe->rx.buf_len; in spi_rtio_iodev_default_submit_sync() 67 rx_buf.buf = sqe->txrx.rx_buf; in spi_rtio_iodev_default_submit_sync() 68 rx_buf.len = sqe->txrx.buf_len; in spi_rtio_iodev_default_submit_sync() 141 uint8_t *tx_buf, *rx_buf; in spi_rtio_copy() local 154 rx_buf = rx_bufs->buffers[rx].buf; in spi_rtio_copy() 157 rx_buf = NULL; in spi_rtio_copy() 177 rx_buf, rx_len, NULL); in spi_rtio_copy() [all …]
|
/Zephyr-latest/drivers/sensor/tdk/icm42670/ |
D | icm42670_spi.c | 32 struct spi_buf rx_buf[2]; in icm42670_reg_read_spi() local 33 const struct spi_buf_set rx = {.buffers = rx_buf, .count = ARRAY_SIZE(rx_buf)}; in icm42670_reg_read_spi() 36 rx_buf[0].buf = NULL; in icm42670_reg_read_spi() 37 rx_buf[0].len = 1; in icm42670_reg_read_spi() 39 rx_buf[1].len = size; in icm42670_reg_read_spi() 40 rx_buf[1].buf = buf; in icm42670_reg_read_spi()
|
/Zephyr-latest/drivers/sensor/bosch/bmm150/ |
D | bmm150_spi.c | 37 struct spi_buf rx_buf[2]; in bmm150_reg_read_spi() local 39 .buffers = rx_buf, in bmm150_reg_read_spi() 40 .count = ARRAY_SIZE(rx_buf) in bmm150_reg_read_spi() 44 rx_buf[0].buf = NULL; in bmm150_reg_read_spi() 45 rx_buf[0].len = 1; in bmm150_reg_read_spi() 47 rx_buf[1].len = 1; in bmm150_reg_read_spi() 53 rx_buf[1].buf = &buf[i]; in bmm150_reg_read_spi()
|
/Zephyr-latest/drivers/sensor/bosch/bme280/ |
D | bme280_spi.c | 37 struct spi_buf rx_buf[2]; in bme280_reg_read_spi() local 39 .buffers = rx_buf, in bme280_reg_read_spi() 40 .count = ARRAY_SIZE(rx_buf) in bme280_reg_read_spi() 44 rx_buf[0].buf = NULL; in bme280_reg_read_spi() 45 rx_buf[0].len = 1; in bme280_reg_read_spi() 47 rx_buf[1].len = 1; in bme280_reg_read_spi() 53 rx_buf[1].buf = &buf[i]; in bme280_reg_read_spi()
|
/Zephyr-latest/drivers/sensor/bosch/bme680/ |
D | bme680_spi.c | 45 const struct spi_buf rx_buf[] = { in bme680_set_mem_page() local 50 .buffers = rx_buf, in bme680_set_mem_page() 51 .count = ARRAY_SIZE(rx_buf), in bme680_set_mem_page() 118 struct spi_buf rx_buf[2]; in bme680_reg_read_spi() local 120 .buffers = rx_buf, in bme680_reg_read_spi() 121 .count = ARRAY_SIZE(rx_buf) in bme680_reg_read_spi() 124 rx_buf[0].buf = NULL; in bme680_reg_read_spi() 125 rx_buf[0].len = 1; in bme680_reg_read_spi() 128 rx_buf[1].buf = buf; in bme680_reg_read_spi() 129 rx_buf[1].len = size; in bme680_reg_read_spi()
|
/Zephyr-latest/drivers/sensor/aosong/dht20/ |
D | dht20.c | 75 uint8_t rx_buf[1]; in read_status() local 84 rc = i2c_read_dt(&cfg->bus, rx_buf, sizeof(rx_buf)); in read_status() 91 *status = rx_buf[0]; in read_status() 100 uint8_t rx_buf[3]; in reset_register() local 103 rc = i2c_write_read_dt(&cfg->bus, tx_buf, sizeof(tx_buf), rx_buf, sizeof(rx_buf)); in reset_register() 111 tx_buf[1] = rx_buf[1]; in reset_register() 112 tx_buf[2] = rx_buf[2]; in reset_register() 175 uint8_t rx_buf[DHT20_MEASUREMENT_BUFFER_LENGTH]; in dht20_read_sample() local 179 rc = i2c_read_dt(&cfg->bus, rx_buf, sizeof(rx_buf)); in dht20_read_sample() 185 status = rx_buf[0]; in dht20_read_sample() [all …]
|
/Zephyr-latest/drivers/sensor/bosch/bmi270/ |
D | bmi270_spi.c | 36 struct spi_buf rx_buf[2]; in bmi270_reg_read_spi() local 38 .buffers = rx_buf, in bmi270_reg_read_spi() 39 .count = ARRAY_SIZE(rx_buf) in bmi270_reg_read_spi() 43 rx_buf[0].buf = &tmp; in bmi270_reg_read_spi() 44 rx_buf[0].len = 2; in bmi270_reg_read_spi() 45 rx_buf[1].len = len; in bmi270_reg_read_spi() 46 rx_buf[1].buf = data; in bmi270_reg_read_spi()
|
/Zephyr-latest/drivers/sensor/sensirion/scd4x/ |
D | scd4x.c | 48 static int scd4x_read_reg(const struct device *dev, uint8_t *rx_buf, uint8_t rx_buf_size) in scd4x_read_reg() argument 53 ret = i2c_read_dt(&cfg->bus, rx_buf, rx_buf_size); in scd4x_read_reg() 60 ret = scd4x_calc_crc(sys_get_be16(&rx_buf[i * 3])); in scd4x_read_reg() 61 if (ret != rx_buf[(i * 3) + 2]) { in scd4x_read_reg() 300 uint8_t rx_buf[3]; in scd4x_get_temperature_offset() local 308 ret = scd4x_read_reg(dev, rx_buf, sizeof(rx_buf)); in scd4x_get_temperature_offset() 317 temp = sys_get_be16(rx_buf) * SCD4X_MAX_TEMP; in scd4x_get_temperature_offset() 327 uint8_t rx_buf[3]; in scd4x_get_sensor_altitude() local 335 ret = scd4x_read_reg(dev, rx_buf, sizeof(rx_buf)); in scd4x_get_sensor_altitude() 341 val->val1 = sys_get_be16(rx_buf); in scd4x_get_sensor_altitude() [all …]
|
/Zephyr-latest/subsys/lorawan/services/ |
D | multicast.c | 111 uint8_t len, const uint8_t *rx_buf) in multicast_package_callback() argument 120 uint8_t command_id = rx_buf[rx_pos++]; in multicast_package_callback() 138 uint8_t id = rx_buf[rx_pos++] & 0x03; in multicast_package_callback() 146 channel.Address = sys_get_le32(rx_buf + rx_pos); in multicast_package_callback() 150 channel.McKeys.McKeyE = (uint8_t *)rx_buf + rx_pos; in multicast_package_callback() 153 channel.FCountMin = sys_get_le32(rx_buf + rx_pos); in multicast_package_callback() 156 channel.FCountMax = sys_get_le32(rx_buf + rx_pos); in multicast_package_callback() 177 uint8_t id = rx_buf[rx_pos++] & 0x03; in multicast_package_callback() 199 uint8_t id = rx_buf[rx_pos++] & 0x03; in multicast_package_callback() 202 session_time = sys_get_le32(rx_buf + rx_pos); in multicast_package_callback() [all …]
|
D | frag_transport.c | 105 uint8_t len, const uint8_t *rx_buf) in frag_transport_package_callback() argument 116 uint8_t command_id = rx_buf[rx_pos++]; in frag_transport_package_callback() 130 uint8_t frag_status = rx_buf[rx_pos++] & 0x07; in frag_transport_package_callback() 163 uint8_t frag_session = rx_buf[rx_pos++] & 0x3F; in frag_transport_package_callback() 171 ctx.nb_frag = sys_get_le16(rx_buf + rx_pos); in frag_transport_package_callback() 174 ctx.frag_size = rx_buf[rx_pos++]; in frag_transport_package_callback() 175 ctx.control = rx_buf[rx_pos++]; in frag_transport_package_callback() 176 ctx.padding = rx_buf[rx_pos++]; in frag_transport_package_callback() 178 ctx.descriptor = sys_get_le32(rx_buf + rx_pos); in frag_transport_package_callback() 238 uint8_t index = rx_buf[rx_pos++] & 0x03; in frag_transport_package_callback() [all …]
|
D | clock_sync.c | 95 uint8_t len, const uint8_t *rx_buf) in clock_sync_package_callback() argument 104 uint8_t command_id = rx_buf[rx_pos++]; in clock_sync_package_callback() 124 time_correction = rx_buf[rx_pos++]; in clock_sync_package_callback() 125 time_correction += rx_buf[rx_pos++] << 8; in clock_sync_package_callback() 126 time_correction += rx_buf[rx_pos++] << 16; in clock_sync_package_callback() 127 time_correction += rx_buf[rx_pos++] << 24; in clock_sync_package_callback() 129 uint8_t token = rx_buf[rx_pos++] & 0x0F; in clock_sync_package_callback() 144 uint8_t period = rx_buf[rx_pos++] & 0x0F; in clock_sync_package_callback() 161 uint8_t nb_transmissions = rx_buf[rx_pos++] & 0x07; in clock_sync_package_callback()
|
/Zephyr-latest/samples/drivers/uart/echo_bot/src/ |
D | main.c | 24 static char rx_buf[MSG_SIZE]; variable 47 rx_buf[rx_buf_pos] = '\0'; in serial_cb() 50 k_msgq_put(&uart_msgq, &rx_buf, K_NO_WAIT); in serial_cb() 54 } else if (rx_buf_pos < (sizeof(rx_buf) - 1)) { in serial_cb() 55 rx_buf[rx_buf_pos++] = c; in serial_cb()
|
/Zephyr-latest/drivers/sensor/renesas/hs400x/ |
D | hs400x.c | 35 uint8_t rx_buf[5]; in hs400x_read_sample() local 38 rc = i2c_read_dt(&cfg->bus, rx_buf, sizeof(rx_buf)); in hs400x_read_sample() 44 *rh_sample = sys_get_be16(rx_buf); in hs400x_read_sample() 45 *t_sample = sys_get_be16(&rx_buf[2]); in hs400x_read_sample() 52 uint8_t crc = crc8(rx_buf, 4, CRC_POLYNOMIAL, CRC_INITIAL, 0); in hs400x_read_sample() 54 if (crc != rx_buf[4]) { in hs400x_read_sample() 55 LOG_ERR("CRC check failed: computed=%u,expected=%u", crc, rx_buf[4]); in hs400x_read_sample()
|
/Zephyr-latest/drivers/modem/ |
D | modem_cmd_handler.c | 39 while (data->rx_buf && data->rx_buf->len && in skipcrlf() 40 is_crlf(*data->rx_buf->data)) { in skipcrlf() 41 net_buf_pull_u8(data->rx_buf); in skipcrlf() 42 if (!data->rx_buf->len) { in skipcrlf() 43 data->rx_buf = net_buf_frag_del(NULL, data->rx_buf); in skipcrlf() 51 struct net_buf *buf = data->rx_buf; in findcrlf() 214 data->rx_buf = net_buf_skip(data->rx_buf, cmd->cmd_len + parsed_len); in process_cmd() 222 net_buf_push(data->rx_buf, cmd->cmd_len + parsed_len); in process_cmd() 273 starts_with(data->rx_buf, data->cmds[j][i].cmd))) { in find_cmd_direct_match() 289 if (!data->rx_buf) { in cmd_handler_process_iface_data() [all …]
|
/Zephyr-latest/drivers/sensor/sensirion/sht3xd/ |
D | sht3xd.c | 80 uint8_t rx_buf[6]; in sht3xd_sample_fetch() local 95 if (i2c_read_dt(&config->bus, rx_buf, sizeof(rx_buf)) < 0) { in sht3xd_sample_fetch() 106 rx_buf, sizeof(rx_buf)) < 0) { in sht3xd_sample_fetch() 112 t_sample = sys_get_be16(&rx_buf[0]); in sht3xd_sample_fetch() 113 if (sht3xd_compute_crc(t_sample) != rx_buf[2]) { in sht3xd_sample_fetch() 118 rh_sample = sys_get_be16(&rx_buf[3]); in sht3xd_sample_fetch() 119 if (sht3xd_compute_crc(rh_sample) != rx_buf[5]) { in sht3xd_sample_fetch()
|
/Zephyr-latest/tests/drivers/uart/uart_async_api/src/ |
D | test_uart_wide.c | 89 uint16_t rx_buf[10] = {0}; in ZTEST_USER() local 94 zassert_not_equal(memcmp(tx_buf, rx_buf, 5), 0, in ZTEST_USER() 97 uart_rx_enable_u16(uart_dev, rx_buf, 10, 50 * USEC_PER_MSEC); in ZTEST_USER() 107 zassert_equal(memcmp(tx_buf, rx_buf, 5), 0, "Buffers not equal"); in ZTEST_USER() 108 zassert_not_equal(memcmp(tx_buf, rx_buf+5, 5), 0, "Buffers not equal"); in ZTEST_USER() 121 zassert_equal(memcmp(tx_buf, rx_buf+5, 5), 0, "Buffers not equal"); in ZTEST_USER()
|
/Zephyr-latest/drivers/sensor/sensirion/sgp40/ |
D | sgp40.c | 102 uint8_t rx_buf[3]; in sgp40_selftest() local 114 rc = i2c_read_dt(&cfg->bus, rx_buf, sizeof(rx_buf)); in sgp40_selftest() 120 raw_sample = sys_get_be16(rx_buf); in sgp40_selftest() 121 if (sgp40_compute_crc(raw_sample) != rx_buf[2]) { in sgp40_selftest() 139 uint8_t rx_buf[3]; in sgp40_sample_fetch() local 155 rc = i2c_read_dt(&cfg->bus, rx_buf, sizeof(rx_buf)); in sgp40_sample_fetch() 161 raw_sample = sys_get_be16(rx_buf); in sgp40_sample_fetch() 162 if (sgp40_compute_crc(raw_sample) != rx_buf[2]) { in sgp40_sample_fetch()
|
/Zephyr-latest/drivers/ieee802154/ |
D | ieee802154_rf2xx_iface.c | 71 const struct spi_buf rx_buf[2] = { in rf2xx_iface_reg_read() local 82 .buffers = rx_buf, in rf2xx_iface_reg_read() 120 const struct spi_buf rx_buf = { in rf2xx_iface_reg_write() local 125 .buffers = &rx_buf, in rf2xx_iface_reg_write() 183 const struct spi_buf rx_buf = { in rf2xx_iface_frame_read() local 188 .buffers = &rx_buf, in rf2xx_iface_frame_read() 234 const struct spi_buf rx_buf = { in rf2xx_iface_frame_write() local 239 .buffers = &rx_buf, in rf2xx_iface_frame_write() 274 const struct spi_buf rx_buf[2] = { in rf2xx_iface_sram_read() local 285 .buffers = rx_buf, in rf2xx_iface_sram_read()
|