Home
last modified time | relevance | path

Searched refs:uart_num (Results 1 – 25 of 28) sorted by relevance

12

/hal_espressif-3.5.0/components/driver/
Duart.c76 #define UART_CONTEX_INIT_DEF(uart_num) {\ argument
77 .hal.dev = UART_LL_GET_HW(uart_num),\
83 #define RTC_ENABLED(uart_num) (BIT(uart_num)) argument
103 uart_port_t uart_num; /*!< UART port number*/ member
175 static void rtc_clk_enable(uart_port_t uart_num) in rtc_clk_enable() argument
178 if (!(rtc_enabled & RTC_ENABLED(uart_num))) { in rtc_clk_enable()
179 rtc_enabled |= RTC_ENABLED(uart_num); in rtc_clk_enable()
185 static void rtc_clk_disable(uart_port_t uart_num) in rtc_clk_disable() argument
187 assert(rtc_enabled & RTC_ENABLED(uart_num)); in rtc_clk_disable()
190 rtc_enabled &= ~RTC_ENABLED(uart_num); in rtc_clk_disable()
[all …]
/hal_espressif-3.5.0/components/driver/include/driver/
Duart.h101 esp_err_t uart_driver_install(uart_port_t uart_num, int rx_buffer_size, int tx_buffer_size, int que…
112 esp_err_t uart_driver_delete(uart_port_t uart_num);
123 bool uart_is_driver_installed(uart_port_t uart_num);
135 esp_err_t uart_set_word_length(uart_port_t uart_num, uart_word_length_t data_bit);
147 esp_err_t uart_get_word_length(uart_port_t uart_num, uart_word_length_t* data_bit);
159 esp_err_t uart_set_stop_bits(uart_port_t uart_num, uart_stop_bits_t stop_bits);
171 esp_err_t uart_get_stop_bits(uart_port_t uart_num, uart_stop_bits_t* stop_bits);
183 esp_err_t uart_set_parity(uart_port_t uart_num, uart_parity_t parity_mode);
196 esp_err_t uart_get_parity(uart_port_t uart_num, uart_parity_t* parity_mode);
208 esp_err_t uart_set_baudrate(uart_port_t uart_num, uint32_t baudrate);
[all …]
Duart_select.h23 typedef void (*uart_select_notif_callback_t)(uart_port_t uart_num, uart_select_notif_t uart_select_…
30 void uart_set_select_notif_callback(uart_port_t uart_num, uart_select_notif_callback_t uart_select_…
/hal_espressif-3.5.0/components/driver/test/
Dtest_uart.c144 static void uart_word_len_set_get_test(int uart_num) in uart_word_len_set_get_test() argument
151 TEST_ESP_OK(uart_set_word_length(uart_num, word_length_set)); in uart_word_len_set_get_test()
152 TEST_ESP_OK(uart_get_word_length(uart_num, &word_length_get)); in uart_word_len_set_get_test()
157 static void uart_stop_bit_set_get_test(int uart_num) in uart_stop_bit_set_get_test() argument
164 TEST_ESP_OK(uart_set_stop_bits(uart_num, stop_bit_set)); in uart_stop_bit_set_get_test()
165 TEST_ESP_OK(uart_get_stop_bits(uart_num, &stop_bit_get)); in uart_stop_bit_set_get_test()
170 static void uart_parity_set_get_test(int uart_num) in uart_parity_set_get_test() argument
180 TEST_ESP_OK(uart_set_parity(uart_num, parity_set[i])); in uart_parity_set_get_test()
181 TEST_ESP_OK(uart_get_parity(uart_num, &parity_get)); in uart_parity_set_get_test()
186 static void uart_hw_flow_set_get_test(int uart_num) in uart_hw_flow_set_get_test() argument
[all …]
/hal_espressif-3.5.0/examples/peripherals/uart/uart_echo_rs485/main/
Drs485_example.c61 const int uart_num = ECHO_UART_PORT; in echo_task() local
79 ESP_ERROR_CHECK(uart_driver_install(uart_num, BUF_SIZE * 2, 0, 0, NULL, 0)); in echo_task()
82 ESP_ERROR_CHECK(uart_param_config(uart_num, &uart_config)); in echo_task()
87 …ESP_ERROR_CHECK(uart_set_pin(uart_num, ECHO_TEST_TXD, ECHO_TEST_RXD, ECHO_TEST_RTS, ECHO_TEST_CTS)… in echo_task()
90 ESP_ERROR_CHECK(uart_set_mode(uart_num, UART_MODE_RS485_HALF_DUPLEX)); in echo_task()
93 ESP_ERROR_CHECK(uart_set_rx_timeout(uart_num, ECHO_READ_TOUT)); in echo_task()
99 echo_send(uart_num, "Start RS485 UART test.\r\n", 24); in echo_task()
103 int len = uart_read_bytes(uart_num, data, BUF_SIZE, PACKET_READ_TICS); in echo_task()
107 echo_send(uart_num, "\r\n", 2); in echo_task()
109 echo_send(uart_num, prefix, (sizeof(prefix) - 1)); in echo_task()
[all …]
/hal_espressif-3.5.0/components/driver/test/touch_sensor_test/
Dtouch_scope.c105 uint8_t uart_num = scope_uart_num; in test_tp_print_to_scope() local
107 if (uart_num >= UART_NUM_MAX) { in test_tp_print_to_scope()
119 if(uart_num != uart_used) { in test_tp_print_to_scope()
123 esp_rom_uart_tx_wait_idle(uart_num); // Default print uart mumber is 0. in test_tp_print_to_scope()
129 uart_wait_tx_done(uart_num, portMAX_DELAY); in test_tp_print_to_scope()
130 return uart_write_bytes(uart_num, (const char *)out_data, out_len); in test_tp_print_to_scope()
154 esp_err_t test_tp_scope_debug_init(uint8_t uart_num, int tx_io_num, int rx_io_num, int baud_rate) in test_tp_scope_debug_init() argument
158 if(uart_num != 0) { in test_tp_scope_debug_init()
159 esp_rom_uart_set_as_console(uart_num); in test_tp_scope_debug_init()
162 if(uart_used == uart_num) { in test_tp_scope_debug_init()
[all …]
/hal_espressif-3.5.0/components/vfs/
Dvfs_uart.c397 static void select_notif_callback_isr(uart_port_t uart_num, uart_select_notif_t uart_select_notif, … in select_notif_callback_isr() argument
405 if (FD_ISSET(uart_num, &args->readfds_orig)) { in select_notif_callback_isr()
406 FD_SET(uart_num, args->readfds); in select_notif_callback_isr()
411 if (FD_ISSET(uart_num, &args->writefds_orig)) { in select_notif_callback_isr()
412 FD_SET(uart_num, args->writefds); in select_notif_callback_isr()
417 if (FD_ISSET(uart_num, &args->errorfds_orig)) { in select_notif_callback_isr()
418 FD_SET(uart_num, args->errorfds); in select_notif_callback_isr()
998 int esp_vfs_dev_uart_port_set_rx_line_endings(int uart_num, esp_line_endings_t mode) in esp_vfs_dev_uart_port_set_rx_line_endings() argument
1000 if (uart_num < 0 || uart_num >= UART_NUM) { in esp_vfs_dev_uart_port_set_rx_line_endings()
1004 s_ctx[uart_num]->rx_mode = mode; in esp_vfs_dev_uart_port_set_rx_line_endings()
[all …]
/hal_espressif-3.5.0/components/bootloader_support/src/
Dbootloader_console.c49 const int uart_num = CONFIG_ESP_CONSOLE_UART_NUM; in bootloader_console_init() local
67 esp_rom_uart_set_as_console(uart_num); in bootloader_console_init()
71 if (uart_num != 0 || in bootloader_console_init()
78 const uint32_t tx_idx = UART_PERIPH_SIGNAL(uart_num, SOC_UART_TX_PIN_IDX); in bootloader_console_init()
79 const uint32_t rx_idx = UART_PERIPH_SIGNAL(uart_num, SOC_UART_RX_PIN_IDX); in bootloader_console_init()
87 periph_ll_enable_clk_clear_rst(PERIPH_UART0_MODULE + uart_num); in bootloader_console_init()
96 esp_rom_uart_set_clock_baudrate(uart_num, clock_hz, CONFIG_ESP_CONSOLE_UART_BAUDRATE); in bootloader_console_init()
/hal_espressif-3.5.0/components/vfs/include/
Desp_vfs_dev.h72 int esp_vfs_dev_uart_port_set_rx_line_endings(int uart_num, esp_line_endings_t mode);
91 int esp_vfs_dev_uart_port_set_tx_line_endings(int uart_num, esp_line_endings_t mode);
99 void esp_vfs_dev_uart_use_nonblocking(int uart_num);
107 void esp_vfs_dev_uart_use_driver(int uart_num);
/hal_espressif-3.5.0/components/protocomm/src/transports/
Dprotocomm_console.c73 int uart_num = (int) arg; in protocomm_console_task() local
80 ESP_LOGD(TAG, "Initializing UART on port %d", uart_num); in protocomm_console_task()
81 uart_driver_install(uart_num, LINE_BUF_SIZE, 0, 8, &uart_queue, 0); in protocomm_console_task()
92 uart_write_bytes(uart_num, "\n>> ", 4); in protocomm_console_task()
105 … while (uart_read_bytes(uart_num, (uint8_t *) &linebuf[i], 1, 0) && (i < LINE_BUF_SIZE)) { in protocomm_console_task()
107 uart_write_bytes(uart_num, "\r\n", 2); in protocomm_console_task()
109 uart_write_bytes(uart_num, (char *) &linebuf[i], 1); in protocomm_console_task()
/hal_espressif-3.5.0/examples/bluetooth/nimble/bleprph/main/
Dscli.c95 int uart_num = (int) arg; in scli_task() local
102 uart_driver_install(uart_num, 256, 0, 8, &uart_queue, 0); in scli_task()
124 while (uart_read_bytes(uart_num, (uint8_t *) &linebuf[i], 1, 0)) { in scli_task()
126 uart_write_bytes(uart_num, "\r\n", 2); in scli_task()
128 uart_write_bytes(uart_num, (char *) &linebuf[i], 1); in scli_task()
/hal_espressif-3.5.0/components/hal/esp32c3/include/hal/
Duart_ll.h976 static inline void uart_ll_force_xoff(uart_port_t uart_num) in uart_ll_force_xoff() argument
978 REG_CLR_BIT(UART_FLOW_CONF_REG(uart_num), UART_FORCE_XON); in uart_ll_force_xoff()
979 REG_SET_BIT(UART_FLOW_CONF_REG(uart_num), UART_SW_FLOW_CON_EN | UART_FORCE_XOFF); in uart_ll_force_xoff()
980 REG_SET_BIT(UART_ID_REG(uart_num), UART_UPDATE); in uart_ll_force_xoff()
990 static inline void uart_ll_force_xon(uart_port_t uart_num) in uart_ll_force_xon() argument
992 REG_CLR_BIT(UART_FLOW_CONF_REG(uart_num), UART_FORCE_XOFF); in uart_ll_force_xon()
993 REG_SET_BIT(UART_FLOW_CONF_REG(uart_num), UART_FORCE_XON); in uart_ll_force_xon()
994 REG_CLR_BIT(UART_FLOW_CONF_REG(uart_num), UART_SW_FLOW_CON_EN | UART_FORCE_XON); in uart_ll_force_xon()
995 REG_SET_BIT(UART_ID_REG(uart_num), UART_UPDATE); in uart_ll_force_xon()
1005 static inline uint32_t uart_ll_get_fsm_status(uart_port_t uart_num) in uart_ll_get_fsm_status() argument
[all …]
Duhci_ll.h47 static inline void uhci_ll_attach_uart_port(uhci_dev_t *hw, int uart_num) in uhci_ll_attach_uart_port() argument
49 hw->conf0.uart0_ce = (uart_num == 0)? 1: 0; in uhci_ll_attach_uart_port()
50 hw->conf0.uart1_ce = (uart_num == 1)? 1: 0; in uhci_ll_attach_uart_port()
/hal_espressif-3.5.0/components/hal/esp32h2/include/hal/
Duart_ll.h964 static inline void uart_ll_force_xoff(uart_port_t uart_num) in uart_ll_force_xoff() argument
966 REG_CLR_BIT(UART_FLOW_CONF_REG(uart_num), UART_FORCE_XON); in uart_ll_force_xoff()
967 REG_SET_BIT(UART_FLOW_CONF_REG(uart_num), UART_SW_FLOW_CON_EN | UART_FORCE_XOFF); in uart_ll_force_xoff()
968 REG_SET_BIT(UART_ID_REG(uart_num), UART_UPDATE); in uart_ll_force_xoff()
978 static inline void uart_ll_force_xon(uart_port_t uart_num) in uart_ll_force_xon() argument
980 REG_CLR_BIT(UART_FLOW_CONF_REG(uart_num), UART_FORCE_XOFF); in uart_ll_force_xon()
981 REG_SET_BIT(UART_FLOW_CONF_REG(uart_num), UART_FORCE_XON); in uart_ll_force_xon()
982 REG_CLR_BIT(UART_FLOW_CONF_REG(uart_num), UART_SW_FLOW_CON_EN | UART_FORCE_XON); in uart_ll_force_xon()
983 REG_SET_BIT(UART_ID_REG(uart_num), UART_UPDATE); in uart_ll_force_xon()
993 static inline uint32_t uart_ll_get_fsm_status(uart_port_t uart_num) in uart_ll_get_fsm_status() argument
[all …]
Duhci_ll.h47 static inline void uhci_ll_attach_uart_port(uhci_dev_t *hw, int uart_num) in uhci_ll_attach_uart_port() argument
49 hw->conf0.uart0_ce = (uart_num == 0)? 1: 0; in uhci_ll_attach_uart_port()
50 hw->conf0.uart1_ce = (uart_num == 1)? 1: 0; in uhci_ll_attach_uart_port()
/hal_espressif-3.5.0/components/hal/esp32s3/include/hal/
Duart_ll.h960 static inline void uart_ll_force_xoff(uart_port_t uart_num) in uart_ll_force_xoff() argument
962 REG_CLR_BIT(UART_FLOW_CONF_REG(uart_num), UART_FORCE_XON); in uart_ll_force_xoff()
963 REG_SET_BIT(UART_FLOW_CONF_REG(uart_num), UART_SW_FLOW_CON_EN | UART_FORCE_XOFF); in uart_ll_force_xoff()
973 FORCE_INLINE_ATTR void uart_ll_force_xon(uart_port_t uart_num) in uart_ll_force_xon() argument
975 REG_CLR_BIT(UART_FLOW_CONF_REG(uart_num), UART_FORCE_XOFF); in uart_ll_force_xon()
976 REG_SET_BIT(UART_FLOW_CONF_REG(uart_num), UART_FORCE_XON); in uart_ll_force_xon()
977 REG_CLR_BIT(UART_FLOW_CONF_REG(uart_num), UART_SW_FLOW_CON_EN | UART_FORCE_XON); in uart_ll_force_xon()
987 FORCE_INLINE_ATTR uint32_t uart_ll_get_fsm_status(uart_port_t uart_num) in uart_ll_get_fsm_status() argument
989 return REG_GET_FIELD(UART_FSM_STATUS_REG(uart_num), UART_ST_UTX_OUT); in uart_ll_get_fsm_status()
Duhci_ll.h47 static inline void uhci_ll_attach_uart_port(uhci_dev_t *hw, int uart_num) in uhci_ll_attach_uart_port() argument
49 hw->conf0.uart0_ce = (uart_num == 0)? 1: 0; in uhci_ll_attach_uart_port()
50 hw->conf0.uart1_ce = (uart_num == 1)? 1: 0; in uhci_ll_attach_uart_port()
51 hw->conf0.uart2_ce = (uart_num == 2)? 1: 0; in uhci_ll_attach_uart_port()
/hal_espressif-3.5.0/components/hal/esp32s2/include/hal/
Duart_ll.h913 FORCE_INLINE_ATTR void uart_ll_force_xoff(uart_port_t uart_num) in uart_ll_force_xoff() argument
915 REG_CLR_BIT(UART_FLOW_CONF_REG(uart_num), UART_FORCE_XON); in uart_ll_force_xoff()
916 REG_SET_BIT(UART_FLOW_CONF_REG(uart_num), UART_SW_FLOW_CON_EN | UART_FORCE_XOFF); in uart_ll_force_xoff()
926 FORCE_INLINE_ATTR void uart_ll_force_xon(uart_port_t uart_num) in uart_ll_force_xon() argument
928 REG_CLR_BIT(UART_FLOW_CONF_REG(uart_num), UART_FORCE_XOFF); in uart_ll_force_xon()
929 REG_SET_BIT(UART_FLOW_CONF_REG(uart_num), UART_FORCE_XON); in uart_ll_force_xon()
930 REG_CLR_BIT(UART_FLOW_CONF_REG(uart_num), UART_SW_FLOW_CON_EN | UART_FORCE_XON); in uart_ll_force_xon()
940 FORCE_INLINE_ATTR uint32_t uart_ll_get_fsm_status(uart_port_t uart_num) in uart_ll_get_fsm_status() argument
942 return REG_GET_FIELD(UART_FSM_STATUS_REG(uart_num), UART_ST_UTX_OUT); in uart_ll_get_fsm_status()
/hal_espressif-3.5.0/components/esp_hw_support/test/
Dtest_dport.c127 const int uart_num = CONFIG_ESP_CONSOLE_UART_NUM; in run_tasks_with_change_freq_cpu() local
141 esp_rom_uart_tx_wait_idle(uart_num); in run_tasks_with_change_freq_cpu()
143 uart_ll_set_sclk(UART_LL_GET_HW(uart_num), UART_SCLK_APB); in run_tasks_with_change_freq_cpu()
144 uart_ll_set_baudrate(UART_LL_GET_HW(uart_num), uart_baud); in run_tasks_with_change_freq_cpu()
154 esp_rom_uart_tx_wait_idle(uart_num); in run_tasks_with_change_freq_cpu()
156 uart_ll_set_sclk(UART_LL_GET_HW(uart_num), UART_SCLK_APB); in run_tasks_with_change_freq_cpu()
157 uart_ll_set_baudrate(UART_LL_GET_HW(uart_num), uart_baud); in run_tasks_with_change_freq_cpu()
/hal_espressif-3.5.0/components/hal/esp32/include/hal/
Duart_ll.h981 FORCE_INLINE_ATTR void uart_ll_force_xoff(uart_port_t uart_num) in uart_ll_force_xoff() argument
984 REG_SET_BIT(UART_FLOW_CONF_REG(uart_num), UART_FORCE_XOFF); in uart_ll_force_xoff()
994 FORCE_INLINE_ATTR void uart_ll_force_xon(uart_port_t uart_num) in uart_ll_force_xon() argument
996 REG_CLR_BIT(UART_FLOW_CONF_REG(uart_num), UART_FORCE_XOFF); in uart_ll_force_xon()
997 REG_SET_BIT(UART_FLOW_CONF_REG(uart_num), UART_FORCE_XON); in uart_ll_force_xon()
998 REG_CLR_BIT(UART_FLOW_CONF_REG(uart_num), UART_FORCE_XON); in uart_ll_force_xon()
1008 FORCE_INLINE_ATTR uint32_t uart_ll_get_fsm_status(uart_port_t uart_num) in uart_ll_get_fsm_status() argument
1010 return REG_GET_FIELD(UART_STATUS_REG(uart_num), UART_ST_UTX_OUT); in uart_ll_get_fsm_status()
/hal_espressif-3.5.0/components/driver/test/touch_sensor_test/include/
Dtouch_scope.h23 esp_err_t test_tp_scope_debug_init(uint8_t uart_num, int tx_io_num, int rx_io_num, int baud_rate);
/hal_espressif-3.5.0/docs/en/api-reference/peripherals/
Duart.rst53 const uart_port_t uart_num = {IDF_TARGET_UART_NUM};
63 ESP_ERROR_CHECK(uart_param_config(uart_num, &uart_config));
164 uart_write_bytes(uart_num, (const char*)test_str, strlen(test_str));
171 uart_write_bytes_with_break(uart_num, "test break\n",strlen("test break\n"), 100);
180 const uart_port_t uart_num = {IDF_TARGET_UART_NUM};
181 … ESP_ERROR_CHECK(uart_wait_tx_done(uart_num, 100)); // wait timeout is 100 RTOS ticks (TickType_t)
192 const uart_port_t uart_num = {IDF_TARGET_UART_NUM};
195 ESP_ERROR_CHECK(uart_get_buffered_data_len(uart_num, (size_t*)&length));
196 length = uart_read_bytes(uart_num, data, length, 100);
215 ESP_ERROR_CHECK(uart_set_mode(uart_num, UART_MODE_RS485_HALF_DUPLEX));
/hal_espressif-3.5.0/components/esp_hw_support/include/
Desp_sleep.h295 esp_err_t esp_sleep_enable_uart_wakeup(int uart_num);
/hal_espressif-3.5.0/components/hal/include/hal/
Duart_hal.h188 void uart_hal_init(uart_hal_context_t *hal, uart_port_t uart_num);
/hal_espressif-3.5.0/zephyr/esp_shared/components/esp_hw_support/
Dsleep_modes.c1116 esp_err_t esp_sleep_enable_uart_wakeup(int uart_num) in esp_sleep_enable_uart_wakeup() argument
1118 if (uart_num == UART_NUM_0) { in esp_sleep_enable_uart_wakeup()
1120 } else if (uart_num == UART_NUM_1) { in esp_sleep_enable_uart_wakeup()

12