/Zephyr-latest/subsys/lorawan/services/ |
D | clock_sync.c | 97 uint8_t tx_buf[3 * MAX_CLOCK_SYNC_ANS_LEN]; in clock_sync_package_callback() local 106 if (sizeof(tx_buf) - tx_pos < MAX_CLOCK_SYNC_ANS_LEN) { in clock_sync_package_callback() 113 tx_buf[tx_pos++] = CLOCK_SYNC_CMD_PKG_VERSION; in clock_sync_package_callback() 114 tx_buf[tx_pos++] = LORAWAN_PACKAGE_ID_CLOCK_SYNC; in clock_sync_package_callback() 115 tx_buf[tx_pos++] = CLOCK_SYNC_PACKAGE_VERSION; in clock_sync_package_callback() 148 tx_buf[tx_pos++] = CLOCK_SYNC_CMD_DEVICE_APP_TIME_PERIODICITY; in clock_sync_package_callback() 149 tx_buf[tx_pos++] = 0x00; /* Status: OK */ in clock_sync_package_callback() 151 tx_pos += clock_sync_serialize_device_time(tx_buf + tx_pos, in clock_sync_package_callback() 152 sizeof(tx_buf) - tx_pos); in clock_sync_package_callback() 177 lorawan_services_schedule_uplink(LORAWAN_PORT_CLOCK_SYNC, tx_buf, tx_pos, 0); in clock_sync_package_callback() [all …]
|
D | multicast.c | 113 uint8_t tx_buf[MAX_MULTICAST_CMDS_PER_PACKAGE * MAX_MULTICAST_ANS_LEN]; in multicast_package_callback() local 122 if (sizeof(tx_buf) - tx_pos < MAX_MULTICAST_ANS_LEN) { in multicast_package_callback() 129 tx_buf[tx_pos++] = MULTICAST_CMD_PKG_VERSION; in multicast_package_callback() 130 tx_buf[tx_pos++] = LORAWAN_PACKAGE_ID_REMOTE_MULTICAST_SETUP; in multicast_package_callback() 131 tx_buf[tx_pos++] = MULTICAST_PACKAGE_VERSION; in multicast_package_callback() 164 tx_buf[tx_pos++] = MULTICAST_CMD_MC_GROUP_SETUP; in multicast_package_callback() 166 tx_buf[tx_pos++] = id; in multicast_package_callback() 169 tx_buf[tx_pos++] = (1U << 2) | id; in multicast_package_callback() 183 tx_buf[tx_pos++] = MULTICAST_CMD_MC_GROUP_DELETE; in multicast_package_callback() 185 tx_buf[tx_pos++] = id; in multicast_package_callback() [all …]
|
D | frag_transport.c | 107 uint8_t tx_buf[FRAG_TRANSPORT_MAX_CMDS_PER_PACKAGE * FRAG_TRANSPORT_MAX_ANS_LEN]; in frag_transport_package_callback() local 118 if (sizeof(tx_buf) - tx_pos < FRAG_TRANSPORT_MAX_ANS_LEN) { in frag_transport_package_callback() 125 tx_buf[tx_pos++] = FRAG_TRANSPORT_CMD_PKG_VERSION; in frag_transport_package_callback() 126 tx_buf[tx_pos++] = LORAWAN_PACKAGE_ID_FRAG_TRANSPORT_BLOCK; in frag_transport_package_callback() 127 tx_buf[tx_pos++] = FRAG_TRANSPORT_VERSION; in frag_transport_package_callback() 146 tx_buf[tx_pos++] = FRAG_TRANSPORT_CMD_FRAG_STATUS; in frag_transport_package_callback() 147 tx_buf[tx_pos++] = ctx.nb_frag_received & 0xFF; in frag_transport_package_callback() 148 tx_buf[tx_pos++] = in frag_transport_package_callback() 150 tx_buf[tx_pos++] = missing_frag; in frag_transport_package_callback() 151 tx_buf[tx_pos++] = memory_error & 0x01; in frag_transport_package_callback() [all …]
|
/Zephyr-latest/drivers/spi/ |
D | spi_litex_common.h | 32 static inline void litex_spi_tx_put(uint8_t len, uint32_t *txd, const uint8_t *tx_buf) in litex_spi_tx_put() argument 36 *txd = sys_get_be32(tx_buf); in litex_spi_tx_put() 39 *txd = sys_get_be24(tx_buf); in litex_spi_tx_put() 42 *txd = sys_get_be16(tx_buf); in litex_spi_tx_put() 45 *txd = *tx_buf; in litex_spi_tx_put()
|
D | spi_rtio.c | 38 struct spi_buf tx_buf = {0}; in spi_rtio_iodev_default_submit_sync() local 40 .buffers = &tx_buf, in spi_rtio_iodev_default_submit_sync() 57 tx_buf.buf = (uint8_t *)sqe->tx.buf; in spi_rtio_iodev_default_submit_sync() 58 tx_buf.len = sqe->tx.buf_len; in spi_rtio_iodev_default_submit_sync() 62 tx_buf.buf = (uint8_t *)sqe->tiny_tx.buf; in spi_rtio_iodev_default_submit_sync() 63 tx_buf.len = sqe->tiny_tx.buf_len; in spi_rtio_iodev_default_submit_sync() 69 tx_buf.buf = (uint8_t *)sqe->txrx.tx_buf; in spi_rtio_iodev_default_submit_sync() 70 tx_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 146 tx_buf = tx_bufs->buffers[tx].buf; in spi_rtio_copy() [all …]
|
/Zephyr-latest/drivers/sensor/sensirion/sht3xd/ |
D | sht3xd.c | 57 uint8_t tx_buf[2]; in sht3xd_write_command() local 59 sys_put_be16(cmd, tx_buf); in sht3xd_write_command() 60 return i2c_write_dt(&config->bus, tx_buf, sizeof(tx_buf)); in sht3xd_write_command() 66 uint8_t tx_buf[5]; in sht3xd_write_reg() local 68 sys_put_be16(cmd, &tx_buf[0]); in sht3xd_write_reg() 69 sys_put_be16(val, &tx_buf[2]); in sht3xd_write_reg() 70 tx_buf[4] = sht3xd_compute_crc(val); in sht3xd_write_reg() 72 return i2c_write_dt(&config->bus, tx_buf, sizeof(tx_buf)); in sht3xd_write_reg() 101 uint8_t tx_buf[2]; in sht3xd_sample_fetch() local 103 sys_put_be16(SHT3XD_CMD_FETCH, tx_buf); in sht3xd_sample_fetch() [all …]
|
/Zephyr-latest/tests/drivers/uart/uart_async_api/src/ |
D | test_uart_async.c | 177 static void tdata_check_recv_buffers(const uint8_t *tx_buf, uint32_t sent_bytes) in tdata_check_recv_buffers() argument 184 zassert_equal(memcmp(tx_buf, tdata.rx_first_buffer, tdata.recv_bytes_first_buffer), 0, in tdata_check_recv_buffers() 186 zassert_equal(memcmp(tx_buf + tdata.recv_bytes_first_buffer, tdata.rx_second_buffer, in tdata_check_recv_buffers() 205 static const uint8_t tx_buf[] = "0123456789"; in ZTEST_USER() local 208 zassert_not_equal(memcmp(tx_buf, tdata.rx_first_buffer, 5), 0, in ZTEST_USER() 215 uart_tx(uart_dev, tx_buf, 5, 100 * USEC_PER_MSEC); in ZTEST_USER() 223 tdata_check_recv_buffers(tx_buf, sent_bytes); in ZTEST_USER() 225 uart_tx(uart_dev, tx_buf + sent_bytes, 5, 100 * USEC_PER_MSEC); in ZTEST_USER() 240 tdata_check_recv_buffers(tx_buf, sent_bytes); in ZTEST_USER() 265 static const uint8_t tx_buf[] = "test"; in ZTEST_USER() local [all …]
|
D | test_uart_wide.c | 92 static const uint16_t tx_buf[5] = {0x74, 0x65, 0x73, 0x74, 0x0D}; in ZTEST_USER() local 94 zassert_not_equal(memcmp(tx_buf, rx_buf, 5), 0, in ZTEST_USER() 101 uart_tx_u16(uart_dev, tx_buf, sizeof(tx_buf)/sizeof(uint16_t), 100 * 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() 110 uart_tx_u16(uart_dev, tx_buf, sizeof(tx_buf)/sizeof(uint16_t), 100 * USEC_PER_MSEC); in ZTEST_USER() 121 zassert_equal(memcmp(tx_buf, rx_buf+5, 5), 0, "Buffers not equal"); in ZTEST_USER()
|
/Zephyr-latest/drivers/sensor/ti/ina23x/ |
D | ina23x_common.c | 43 uint8_t tx_buf[3]; in ina23x_reg_write() local 45 tx_buf[0] = reg; in ina23x_reg_write() 46 sys_put_be16(val, &tx_buf[1]); in ina23x_reg_write() 48 return i2c_write_dt(bus, tx_buf, sizeof(tx_buf)); in ina23x_reg_write()
|
/Zephyr-latest/drivers/sensor/aosong/dht20/ |
D | dht20.c | 74 uint8_t tx_buf[] = {DHT20_STATUS_REGISTER}; in read_status() local 78 rc = i2c_write_dt(&cfg->bus, tx_buf, sizeof(tx_buf)); in read_status() 99 uint8_t tx_buf[] = {reg, 0, 0}; 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() 110 tx_buf[0] = DHT20_MASK_RESET_REGISTER | reg; in reset_register() 111 tx_buf[1] = rx_buf[1]; in reset_register() 112 tx_buf[2] = rx_buf[2]; in reset_register() 113 rc = i2c_write_dt(&cfg->bus, tx_buf, sizeof(tx_buf)); in reset_register() 208 uint8_t tx_buf[DHT20_TRIGGER_MEASUREMENT_BUFFER_LENGTH] = { in dht20_sample_fetch() local 221 rc = i2c_write_dt(&cfg->bus, tx_buf, sizeof(tx_buf)); in dht20_sample_fetch()
|
/Zephyr-latest/drivers/ethernet/ |
D | eth_lan9250.c | 30 struct spi_buf tx_buf[3]; in lan9250_write_sys_reg() local 31 const struct spi_buf_set tx = {.buffers = tx_buf, .count = 3}; in lan9250_write_sys_reg() 36 tx_buf[0].buf = &cmd; in lan9250_write_sys_reg() 37 tx_buf[0].len = ARRAY_SIZE(cmd); in lan9250_write_sys_reg() 38 tx_buf[1].buf = addr; in lan9250_write_sys_reg() 39 tx_buf[1].len = ARRAY_SIZE(addr); in lan9250_write_sys_reg() 40 tx_buf[2].buf = instr; in lan9250_write_sys_reg() 41 tx_buf[2].len = ARRAY_SIZE(instr); in lan9250_write_sys_reg() 51 struct spi_buf tx_buf[3]; in lan9250_read_sys_reg() local 53 const struct spi_buf_set tx = {.buffers = tx_buf, .count = 3}; in lan9250_read_sys_reg() [all …]
|
/Zephyr-latest/drivers/sensor/bosch/bme680/ |
D | bme680_spi.c | 36 struct spi_buf tx_buf = { in bme680_set_mem_page() local 41 .buffers = &tx_buf, in bme680_set_mem_page() 67 tx_buf.len = 2; in bme680_set_mem_page() 85 const struct spi_buf tx_buf = { in bme680_reg_write_spi() local 90 .buffers = &tx_buf, in bme680_reg_write_spi() 110 const struct spi_buf tx_buf = { in bme680_reg_read_spi() local 115 .buffers = &tx_buf, in bme680_reg_read_spi()
|
/Zephyr-latest/drivers/sensor/bosch/bmi270/ |
D | bmi270_spi.c | 28 const struct spi_buf tx_buf = { in bmi270_reg_read_spi() local 33 .buffers = &tx_buf, in bmi270_reg_read_spi() 65 const struct spi_buf tx_buf[2] = { in bmi270_reg_write_spi() local 70 .buffers = tx_buf, in bmi270_reg_write_spi() 71 .count = ARRAY_SIZE(tx_buf) in bmi270_reg_write_spi()
|
/Zephyr-latest/drivers/sensor/sensirion/sgp40/ |
D | sgp40.c | 36 uint8_t tx_buf[2]; in sgp40_write_command() local 38 sys_put_be16(cmd, tx_buf); in sgp40_write_command() 40 return i2c_write_dt(&cfg->bus, tx_buf, sizeof(tx_buf)); in sgp40_write_command() 47 uint8_t tx_buf[8]; in sgp40_start_measurement() local 49 sys_put_be16(SGP40_CMD_MEASURE_RAW, tx_buf); in sgp40_start_measurement() 50 sys_put_be24(sys_get_be24(data->rh_param), &tx_buf[2]); in sgp40_start_measurement() 51 sys_put_be24(sys_get_be24(data->t_param), &tx_buf[5]); in sgp40_start_measurement() 53 return i2c_write_dt(&cfg->bus, tx_buf, sizeof(tx_buf)); in sgp40_start_measurement()
|
/Zephyr-latest/drivers/ieee802154/ |
D | ieee802154_rf2xx_iface.c | 63 const struct spi_buf tx_buf = { in rf2xx_iface_reg_read() local 68 .buffers = &tx_buf, in rf2xx_iface_reg_read() 106 const struct spi_buf tx_buf[2] = { in rf2xx_iface_reg_write() local 117 .buffers = tx_buf, in rf2xx_iface_reg_write() 175 const struct spi_buf tx_buf = { in rf2xx_iface_frame_read() local 180 .buffers = &tx_buf, in rf2xx_iface_frame_read() 216 const struct spi_buf tx_buf[3] = { in rf2xx_iface_frame_write() local 231 .buffers = tx_buf, in rf2xx_iface_frame_write() 260 const struct spi_buf tx_buf[2] = { in rf2xx_iface_sram_read() local 271 .buffers = tx_buf, in rf2xx_iface_sram_read()
|
/Zephyr-latest/drivers/display/ |
D | display_max7219.c | 71 uint8_t *tx_buf; member 79 const struct spi_buf tx_buf = { in max7219_transmit_all() local 80 .buf = dev_data->tx_buf, in max7219_transmit_all() 84 .buffers = &tx_buf, in max7219_transmit_all() 89 dev_data->tx_buf[i * 2] = addr; in max7219_transmit_all() 90 dev_data->tx_buf[i * 2 + 1] = value; in max7219_transmit_all() 102 const struct spi_buf tx_buf = { in max7219_transmit_one() local 103 .buf = dev_data->tx_buf, in max7219_transmit_one() 107 .buffers = &tx_buf, in max7219_transmit_one() 113 dev_data->tx_buf[i * 2] = MAX7219_REG_NOOP; in max7219_transmit_one() [all …]
|
/Zephyr-latest/subsys/mgmt/ec_host_cmd/backends/ |
D | ec_host_cmd_backend_simulator.c | 34 struct ec_host_cmd_tx_buf *tx_buf) in ec_host_cmd_sim_init() argument 39 hc_sim->tx = tx_buf; in ec_host_cmd_sim_init() 60 struct ec_host_cmd_tx_buf **tx_buf) in ec_host_cmd_backend_sim_install_send_cb() argument 63 *tx_buf = hc_sim->tx; in ec_host_cmd_backend_sim_install_send_cb()
|
/Zephyr-latest/drivers/adc/ |
D | adc_ads131m02.c | 140 struct spi_buf tx_buf = { in ads131m02_transceive() local 145 .buffers = &tx_buf, in ads131m02_transceive() 170 uint8_t tx_buf[3] = {0}; in ads131m02_reg_read() local 173 sys_put_be16(temp, tx_buf); in ads131m02_reg_read() 175 return ads131m02_transceive(dev, tx_buf, sizeof(tx_buf), in ads131m02_reg_read() 183 uint8_t tx_buf[6] = {0}; in ads131m02_reg_write() local 187 sys_put_be16(temp, tx_buf); in ads131m02_reg_write() 188 sys_put_be16(write_data, &tx_buf[3]); in ads131m02_reg_write() 190 return ads131m02_transceive(dev, tx_buf, sizeof(tx_buf), in ads131m02_reg_write() 438 uint8_t tx_buf[4] = {0}; in ads131m02_read_sample() local [all …]
|
/Zephyr-latest/drivers/sensor/microchip/tcn75a/ |
D | tcn75a_trigger.c | 51 uint8_t tx_buf[3]; in tcn75a_attr_set() local 59 tx_buf[0] = TCN75A_THYST_REG; in tcn75a_attr_set() 62 tx_buf[0] = TCN75A_TSET_REG; in tcn75a_attr_set() 69 tx_buf[1] = (uint8_t)val->val1; in tcn75a_attr_set() 70 tx_buf[2] = TCN75A_SENSOR_TO_FIXED_PT(val->val2); in tcn75a_attr_set() 72 LOG_DBG("Writing 0x%02X to limit reg %s", *(uint16_t *)(tx_buf + 1), in tcn75a_attr_set() 73 tx_buf[0] == TCN75A_THYST_REG ? "THYST" : "TSET"); in tcn75a_attr_set() 75 return i2c_write_dt(&config->i2c_spec, tx_buf, 3); in tcn75a_attr_set()
|
/Zephyr-latest/drivers/sensor/st/stmemsc/ |
D | stmemsc_spi.c | 26 const struct spi_buf tx_buf = { .buf = buffer_tx, .len = 2, }; in stmemsc_spi_read() local 27 const struct spi_buf_set tx = { .buffers = &tx_buf, .count = 1 }; in stmemsc_spi_read() 54 const struct spi_buf tx_buf[2] = { in stmemsc_spi_write() local 58 const struct spi_buf_set tx = { .buffers = tx_buf, .count = 2 }; in stmemsc_spi_write()
|
/Zephyr-latest/drivers/sensor/tdk/icm42670/ |
D | icm42670_spi.c | 30 const struct spi_buf tx_buf = {.buf = cmd, .len = sizeof(cmd)}; in icm42670_reg_read_spi() local 31 const struct spi_buf_set tx = {.buffers = &tx_buf, .count = 1}; in icm42670_reg_read_spi() 54 const struct spi_buf tx_buf[2] = {{.buf = cmd, .len = sizeof(cmd)}, in icm42670_reg_write_spi() local 56 const struct spi_buf_set tx = {.buffers = tx_buf, .count = 2}; in icm42670_reg_write_spi()
|
/Zephyr-latest/drivers/sensor/bosch/bmm150/ |
D | bmm150_spi.c | 29 const struct spi_buf tx_buf = { in bmm150_reg_read_spi() local 34 .buffers = &tx_buf, in bmm150_reg_read_spi() 69 const struct spi_buf tx_buf = { in bmm150_reg_write_spi() local 74 .buffers = &tx_buf, in bmm150_reg_write_spi()
|
/Zephyr-latest/drivers/sensor/bosch/bme280/ |
D | bme280_spi.c | 29 const struct spi_buf tx_buf = { in bme280_reg_read_spi() local 34 .buffers = &tx_buf, in bme280_reg_read_spi() 69 const struct spi_buf tx_buf = { in bme280_reg_write_spi() local 74 .buffers = &tx_buf, in bme280_reg_write_spi()
|
/Zephyr-latest/modules/nrf_wifi/bus/ |
D | spi_if.c | 39 const struct spi_buf tx_buf[] = { in spim_xfer_tx() local 43 const struct spi_buf_set tx = { .buffers = tx_buf, .count = 2 }; in spim_xfer_tx() 63 const struct spi_buf tx_buf[] = { in spim_xfer_rx() local 68 const struct spi_buf_set tx = { .buffers = tx_buf, .count = 2 }; in spim_xfer_rx() 90 const struct spi_buf tx_buf = { in spim_read_reg() local 96 .buffers = &tx_buf, in spim_read_reg() 124 const struct spi_buf tx_buf = { .buf = tx_buffer, .len = sizeof(tx_buffer) }; in spim_write_reg() local 125 const struct spi_buf_set tx = { .buffers = &tx_buf, .count = 1 }; in spim_write_reg() 219 const struct spi_buf tx_buf = { .buf = tx_buffer, .len = sizeof(tx_buffer) }; in spim_cmd_sleep_rpu() local 220 const struct spi_buf_set tx = { .buffers = &tx_buf, .count = 1 }; in spim_cmd_sleep_rpu()
|
/Zephyr-latest/drivers/fpga/ |
D | fpga_ice40_spi.c | 25 struct spi_buf tx_buf; in fpga_ice40_load() local 27 .buffers = &tx_buf, in fpga_ice40_load() 104 tx_buf.buf = clock_buf; in fpga_ice40_load() 105 tx_buf.len = DIV_ROUND_UP(config->leading_clocks, BITS_PER_BYTE); in fpga_ice40_load() 120 tx_buf.buf = image_ptr; in fpga_ice40_load() 121 tx_buf.len = img_size; in fpga_ice40_load() 136 tx_buf.buf = clock_buf; in fpga_ice40_load() 137 tx_buf.len = DIV_ROUND_UP(config->trailing_clocks, BITS_PER_BYTE); in fpga_ice40_load()
|