Home
last modified time | relevance | path

Searched refs:trans (Results 1 – 25 of 34) sorted by relevance

12

/hal_espressif-3.5.0/examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/
Dtransaction.c22 static void transaction_reset(transaction_t *trans) in transaction_reset() argument
26 ESP_LOGV(TAG, "transaction reset: %x", (uint32_t) trans); in transaction_reset()
29 trans->type = 0; in transaction_reset()
30 trans->sub_type = 0; in transaction_reset()
31 trans->current_bits = 0; in transaction_reset()
32 bits = xEventGroupGetBits(trans->event_group); in transaction_reset()
33 xEventGroupClearBits(trans->event_group, bits); in transaction_reset()
34 trans->state = TRANSACTION_INACTIVE; in transaction_reset()
35 trans->ret = ESP_OK; in transaction_reset()
39 void transaction_deinit(transaction_t *trans) in transaction_deinit() argument
[all …]
Dtransaction.h62 esp_err_t transaction_init(transaction_t **trans, uint8_t type, uint32_t sub_type, EventBits_t wait…
63 esp_err_t transaction_run(transaction_t *trans);
67 esp_err_t transaction_set_events(transaction_t *trans, EventBits_t events);
68 esp_err_t transaction_test_events(transaction_t *trans, EventBits_t events);
69 esp_err_t transaction_clear_events(transaction_t *trans, EventBits_t events);
71 esp_err_t transaction_abort(transaction_t *trans, esp_err_t reason);
73 #define TRANSACTION_INIT(trans, type, sub_type, wait_events, timeout, input, output) \ argument
74 ESP_ERROR_CHECK(transaction_init(trans, type, sub_type, wait_events, timeout, input, output))
Dble_mesh_register_cmd.c366 transaction_t *trans = NULL; in ble_mesh_model_cb() local
370 trans = transaction_get(TRANS_TYPE_MESH_PERF, TRANS_MESH_SEND_MESSAGE, trans); in ble_mesh_model_cb()
371 if (trans) { in ble_mesh_model_cb()
372 start_time = (uint64_t *)trans->input; in ble_mesh_model_cb()
375 }while(trans); in ble_mesh_model_cb()
419 if (trans) { in ble_mesh_model_cb()
423 transaction_set_events(trans, TRANS_MESH_SEND_MESSAGE_EVT); in ble_mesh_model_cb()
440 if (trans) { in ble_mesh_model_cb()
444 transaction_set_events(trans, TRANS_MESH_SEND_MESSAGE_EVT); in ble_mesh_model_cb()
452 if (trans) { in ble_mesh_model_cb()
[all …]
Dble_mesh_reg_test_perf_client_cmd.c52 transaction_t *trans = NULL; in ble_mesh_test_performance_client_model_throughput() local
73 TRANSACTION_INIT(&trans, TRANS_TYPE_MESH_PERF, TRANS_MESH_SEND_MESSAGE, in ble_mesh_test_performance_client_model_throughput()
79 transaction_run(trans); in ble_mesh_test_performance_client_model_throughput()
/hal_espressif-3.5.0/components/hal/
Dspi_hal_iram.c61 …trans(spi_hal_context_t *hal, const spi_hal_dev_config_t *dev, const spi_hal_trans_config_t *trans) in spi_hal_setup_trans() argument
70 spi_ll_master_set_line_mode(hw, trans->line_mode); in spi_hal_setup_trans()
74 if (trans->rcv_buffer && !dev->no_compensate && dev->half_duplex) { in spi_hal_setup_trans()
80 spi_ll_set_dummy(hw, extra_dummy + trans->dummy_bits); in spi_hal_setup_trans()
108 spi_ll_set_mosi_bitlen(hw, trans->tx_bitlen); in spi_hal_setup_trans()
111 spi_ll_set_miso_bitlen(hw, trans->rx_bitlen); in spi_hal_setup_trans()
114 spi_ll_set_miso_bitlen(hw, trans->tx_bitlen); in spi_hal_setup_trans()
118 int cmdlen = trans->cmd_bits; in spi_hal_setup_trans()
119 int addrlen = trans->addr_bits; in spi_hal_setup_trans()
131 spi_ll_set_command(hw, trans->cmd, cmdlen, dev->tx_lsbfirst); in spi_hal_setup_trans()
[all …]
Dspi_flash_hal_common.inc132 esp_err_t spi_flash_hal_common_command(spi_flash_host_inst_t *host, spi_flash_trans_t *trans)
138 if (trans->reserved != 0) {
140 command = (uint8_t)trans->reserved;
143 command = trans->command;
144 dummy_bitlen = trans->dummy_bitlen;
145 if ((trans->flags & SPI_FLASH_TRANS_FLAG_IGNORE_BASEIO) != 0) {
146 io_mode = trans->io_mode;
150 … host->driver->configure_host_io_mode(host, command, trans->address_bitlen, dummy_bitlen, io_mode);
152 spi_flash_ll_set_usr_address(dev, trans->address, trans->address_bitlen);
154 if (trans->miso_len == 0) {
[all …]
/hal_espressif-3.5.0/examples/peripherals/spi_master/lcd/main/
Dspi_master_example_main.c322 static spi_transaction_t trans[6]; in send_lines() local
327 memset(&trans[x], 0, sizeof(spi_transaction_t)); in send_lines()
330 trans[x].length=8; in send_lines()
331 trans[x].user=(void*)0; in send_lines()
334 trans[x].length=8*4; in send_lines()
335 trans[x].user=(void*)1; in send_lines()
337 trans[x].flags=SPI_TRANS_USE_TXDATA; in send_lines()
339 trans[0].tx_data[0]=0x2A; //Column Address Set in send_lines()
340 trans[1].tx_data[0]=0; //Start Col High in send_lines()
341 trans[1].tx_data[1]=0; //Start Col Low in send_lines()
[all …]
/hal_espressif-3.5.0/components/driver/test/
Dtest_spi_master.c658 static spi_transaction_t trans[TEST_REGION_SIZE]; variable
660 memset(trans, 0, sizeof(trans));
663 trans[0].length = 320 * 8,
664 trans[0].tx_buffer = data_iram;
665 trans[0].rx_buffer = data_malloc + 1;
667 trans[1].length = 320 * 8,
668 trans[1].tx_buffer = data_dram;
669 trans[1].rx_buffer = data_iram;
671 trans[2].length = 320 * 8,
672 trans[2].tx_buffer = data_drom;
[all …]
Dtest_common_spi.c116 spi_transaction_t* trans = context->master_trans; in spitest_init_transactions() local
126 trans[i] = (spi_transaction_t) { in spitest_init_transactions()
131 trans[i] = (spi_transaction_t) { in spitest_init_transactions()
136 trans[i] = (spi_transaction_t) { in spitest_init_transactions()
Dtest_spi_bus_lock.c306 spi_transaction_t trans = { in test_polling_send() local
310 esp_err_t err = spi_device_polling_transmit(handle, &trans); in test_polling_send()
/hal_espressif-3.5.0/examples/peripherals/spi_slave_hd/append_mode/slave/main/
Dapp_main.c35 spi_slave_hd_data_t trans; member
81 trans_link[i].trans.data = data_buf[i]; in create_transaction_pool()
103 tx_trans->trans.len = TRANSACTION_LEN; in prepare_tx_data()
104 for(int i = 0; i < tx_trans->trans.len; i++) { in prepare_tx_data()
105 tx_trans->trans.data[i] = data + i; in prepare_tx_data()
145 …CHECK(spi_slave_hd_append_trans(HOST_ID, SPI_SLAVE_CHAN_TX, &trans_to_send->trans, portMAX_DELAY)); in sendTask()
159 ret_link = __containerof(ret_trans, trans_link_t, trans); in sendTask()
165 …CHECK(spi_slave_hd_append_trans(HOST_ID, SPI_SLAVE_CHAN_TX, &trans_to_send->trans, portMAX_DELAY)); in sendTask()
180 rx_curr_trans->trans.len = TRANSACTION_LEN; in get_rx_transaction_descriptor()
210 …HECK(spi_slave_hd_append_trans(HOST_ID, SPI_SLAVE_CHAN_RX, &trans_for_recv->trans, portMAX_DELAY)); in recvTask()
[all …]
/hal_espressif-3.5.0/components/driver/
Dspi_slave_hd.c305 .trans = host->tx_desc, in spi_slave_hd_intr_segment()
324 .trans = host->rx_desc, in spi_slave_hd_intr_segment()
348 .trans = host->tx_desc, in spi_slave_hd_intr_segment()
364 .trans = host->rx_desc, in spi_slave_hd_intr_segment()
419 .trans = trans_desc, in spi_slave_hd_intr_append()
451 .trans = trans_desc, in spi_slave_hd_intr_append()
475 spi_slave_hd_data_t *trans; in get_ret_queue_result() local
479 ret = xQueueReceive(host->tx_ret_queue, &trans, timeout); in get_ret_queue_result()
481 ret = xQueueReceive(host->rx_ret_queue, &trans, timeout); in get_ret_queue_result()
487 *out_trans = trans; in get_ret_queue_result()
[all …]
Dspi_master.c130 spi_transaction_t *trans; member
514 spi_transaction_t *trans = trans_buf->trans; in spi_new_trans() local
526 hal_trans.tx_bitlen = trans->length; in spi_new_trans()
527 hal_trans.rx_bitlen = trans->rxlength; in spi_new_trans()
530 hal_trans.cmd = trans->cmd; in spi_new_trans()
531 hal_trans.addr = trans->addr; in spi_new_trans()
532 hal_trans.cs_keep_active = (trans->flags & SPI_TRANS_CS_KEEP_ACTIVE) ? 1 : 0; in spi_new_trans()
535 hal_trans.line_mode.data_lines = (trans->flags & SPI_TRANS_MODE_DIO) ? 2 : in spi_new_trans()
536 (trans->flags & SPI_TRANS_MODE_QIO) ? 4 : 1; in spi_new_trans()
538 if (trans->flags & SPI_TRANS_MODE_OCT) { in spi_new_trans()
[all …]
Dspi_slave.c333 spi_slave_transaction_t *trans = NULL; in spi_intr() local
371 r = xQueueReceiveFromISR(host->trans_queue, &trans, &do_yield); in spi_intr()
377 host->cur_trans = trans; in spi_intr()
379 hal->bitlen = trans->length; in spi_intr()
380 hal->rx_buffer = trans->rx_buffer; in spi_intr()
381 hal->tx_buffer = trans->tx_buffer; in spi_intr()
397 if (host->cfg.post_setup_cb) host->cfg.post_setup_cb(trans); in spi_intr()
/hal_espressif-3.5.0/components/esp_http_server/src/
Dhttpd_ws.c503 async_transfer_t *trans = arg; in httpd_ws_send_cb() local
505 esp_err_t err = httpd_ws_send_frame_async(trans->handle, trans->socket, &trans->frame); in httpd_ws_send_cb()
507 if (trans->blocking) { in httpd_ws_send_cb()
508 xEventGroupSetBits(trans->transfer_done, err ? WS_SEND_FAILED : WS_SEND_OK); in httpd_ws_send_cb()
509 } else if (trans->callback) { in httpd_ws_send_cb()
510 trans->callback(err, trans->socket, trans->arg); in httpd_ws_send_cb()
513 free(trans); in httpd_ws_send_cb()
/hal_espressif-3.5.0/components/esp_lcd/src/
Desp_lcd_panel_io_spi.c25 static void lcd_spi_pre_trans_cb(spi_transaction_t *trans);
26 static void lcd_spi_post_trans_color_cb(spi_transaction_t *trans);
259 static void lcd_spi_pre_trans_cb(spi_transaction_t *trans) in lcd_spi_pre_trans_cb() argument
261 esp_lcd_panel_io_spi_t *spi_panel_io = trans->user; in lcd_spi_pre_trans_cb()
262 lcd_spi_trans_descriptor_t *lcd_trans = __containerof(trans, lcd_spi_trans_descriptor_t, base); in lcd_spi_pre_trans_cb()
268 static void lcd_spi_post_trans_color_cb(spi_transaction_t *trans) in lcd_spi_post_trans_color_cb() argument
270 esp_lcd_panel_io_spi_t *spi_panel_io = trans->user; in lcd_spi_post_trans_color_cb()
271 lcd_spi_trans_descriptor_t *lcd_trans = __containerof(trans, lcd_spi_trans_descriptor_t, base); in lcd_spi_post_trans_color_cb()
/hal_espressif-3.5.0/examples/storage/custom_flash_driver/components/custom_chip_driver/
Dspi_flash_chip_eon.c38 spi_flash_trans_t trans = { in spi_flash_chip_eon_enter_otp_mode() local
41 return chip->host->driver->common_command(chip->host, &trans); in spi_flash_chip_eon_enter_otp_mode()
46 spi_flash_trans_t trans = { in spi_flash_chip_eon_exit_otp_mode() local
49 return chip->host->driver->common_command(chip->host, &trans); in spi_flash_chip_eon_exit_otp_mode()
/hal_espressif-3.5.0/examples/ethernet/enc28j60/components/eth_enc28j60/
Desp_eth_mac_enc28j60.c185 spi_transaction_t trans = { in enc28j60_do_register_write() local
195 if (spi_device_polling_transmit(emac->spi_hdl, &trans) != ESP_OK) { in enc28j60_do_register_write()
212 spi_transaction_t trans = { in enc28j60_do_register_read() local
219 if (spi_device_polling_transmit(emac->spi_hdl, &trans) != ESP_OK) { in enc28j60_do_register_read()
223 *value = is_eth_reg ? trans.rx_data[0] : trans.rx_data[1]; in enc28j60_do_register_read()
239 spi_transaction_t trans = { in enc28j60_do_bitwise_set() local
249 if (spi_device_polling_transmit(emac->spi_hdl, &trans) != ESP_OK) { in enc28j60_do_bitwise_set()
267 spi_transaction_t trans = { in enc28j60_do_bitwise_clr() local
277 if (spi_device_polling_transmit(emac->spi_hdl, &trans) != ESP_OK) { in enc28j60_do_bitwise_clr()
294 spi_transaction_t trans = { in enc28j60_do_memory_write() local
[all …]
/hal_espressif-3.5.0/components/driver/include/driver/
Dspi_slave_hd.h37 …spi_slave_hd_data_t* trans; ///< Corresponding transaction for SPI_EV_SEND and SPI… member
130 …ns(spi_host_device_t host_id, spi_slave_chan_t chan, spi_slave_hd_data_t* trans, TickType_t timeou…
187 …ns(spi_host_device_t host_id, spi_slave_chan_t chan, spi_slave_hd_data_t *trans, TickType_t timeou…
Dspi_slave.h29 typedef void(*slave_transaction_cb_t)(spi_slave_transaction_t *trans);
/hal_espressif-3.5.0/components/esp_eth/src/
Desp_eth_mac_dm9051.c70 spi_transaction_t trans = { in dm9051_register_write() local
76 trans.tx_data[0] = value; in dm9051_register_write()
78 if (spi_device_polling_transmit(emac->spi_hdl, &trans) != ESP_OK) { in dm9051_register_write()
95 spi_transaction_t trans = { in dm9051_register_read() local
102 if (spi_device_polling_transmit(emac->spi_hdl, &trans) != ESP_OK) { in dm9051_register_read()
106 *value = trans.rx_data[0]; in dm9051_register_read()
121 spi_transaction_t trans = { in dm9051_memory_write() local
128 if (spi_device_polling_transmit(emac->spi_hdl, &trans) != ESP_OK) { in dm9051_memory_write()
145 spi_transaction_t trans = { in dm9051_memory_read() local
152 if (spi_device_polling_transmit(emac->spi_hdl, &trans) != ESP_OK) { in dm9051_memory_read()
[all …]
Desp_eth_mac_ksz8851snl.c90 spi_transaction_ext_t trans = { in ksz8851_read_reg() local
99 if (spi_device_polling_transmit(emac->spi_hdl, &trans.base) != ESP_OK) { in ksz8851_read_reg()
104 memcpy(value, trans.base.rx_data, data_size >> 3U); in ksz8851_read_reg()
124 spi_transaction_ext_t trans = { in ksz8851_write_reg() local
133 memcpy(trans.base.tx_data, &value, data_size >> 3U); in ksz8851_write_reg()
135 if (spi_device_polling_transmit(emac->spi_hdl, &trans.base) != ESP_OK) { in ksz8851_write_reg()
328 spi_transaction_ext_t trans = { in emac_ksz8851snl_transmit() local
342 if (spi_device_polling_transmit(emac->spi_hdl, &trans.base) != ESP_OK) { in emac_ksz8851snl_transmit()
380 spi_transaction_ext_t trans = { in emac_ksz8851_receive() local
391 if (spi_device_polling_transmit(emac->spi_hdl, &trans.base) != ESP_OK) { in emac_ksz8851_receive()
Desp_eth_mac_w5500.c66 spi_transaction_t trans = { in w5500_write() local
73 if (spi_device_polling_transmit(emac->spi_hdl, &trans) != ESP_OK) { in w5500_write()
88 spi_transaction_t trans = { in w5500_read() local
96 if (spi_device_polling_transmit(emac->spi_hdl, &trans) != ESP_OK) { in w5500_read()
104 if ((trans.flags&SPI_TRANS_USE_RXDATA) && len <= 4) { in w5500_read()
105 memcpy(value, trans.rx_data, len); // copy register values to output in w5500_read()
/hal_espressif-3.5.0/examples/peripherals/spi_slave/receiver/main/
Dapp_main.c87 void my_post_setup_cb(spi_slave_transaction_t *trans) { in my_post_setup_cb() argument
92 void my_post_trans_cb(spi_slave_transaction_t *trans) { in my_post_trans_cb() argument
/hal_espressif-3.5.0/examples/bluetooth/esp_ble_mesh/aligenie_demo/components/vendor_model/
Dgenie_mesh.c65 p_elem->state.trans = 0; in clear_trans_para()
81 if (p_state->trans == 0) { in mesh_trans_timer_cycle()
163 p_state->trans = 0; in calc_cur_state()
977 p_elem[i].state.trans = 0x41; in elem_state_init()
979 if (p_elem[i].state.trans) { in elem_state_init()
981 …ate.trans_end_time = p_elem[i].state.trans_start_time + get_transition_time(p_elem[i].state.trans); in elem_state_init()
1030 uint8_t remain_byte = p_state->trans; in get_remain_byte()
1035 uint32_t l_trans = get_transition_time(p_state->trans); in get_remain_byte()

12