|
MeterLogger
|
Go to the source code of this file.
Data Structures | |
| struct | RcvMsgBuff |
| struct | TrxMsgBuff |
| struct | UartDevice |
| struct | UartBuffer |
| struct | UartRxBuff |
Macros | |
| #define | UART_TX_BUFFER_SIZE 256 |
| #define | UART_RX_BUFFER_SIZE 256 |
| #define | UART_BUFF_EN 0 |
| #define | UART_SELFTEST 0 |
| #define | UART_HW_RTS 0 |
| #define | UART_HW_CTS 0 |
| #define | UART_LINE_INV_MASK (0x3f<<19) |
| #define | UART0 0 |
| #define | UART1 1 |
| #define | UART_FIFO_LEN 128 |
| #define | UART_TX_EMPTY_THRESH_VAL 0x10 |
Functions | |
| void | uart_init (UartBautRate uart0_br, UartBautRate uart1_br) |
| void | uart0_sendStr (const char *str) |
| STATUS | uart_tx_one_char (uint8 uart, uint8 TxChar) |
| STATUS | uart_tx_one_char_no_wait (uint8 uart, uint8 TxChar) |
| void | uart1_sendStr_no_wait (const char *str) |
| struct UartBuffer * | Uart_Buf_Init () |
| void | uart_rx_intr_enable (uint8 uart_no) |
| void | uart_rx_intr_disable (uint8 uart_no) |
| void | uart0_tx_buffer (uint8 *buf, uint16 len) |
| void ICACHE_FLASH_ATTR | uart_set_word_length (uint8_t uart_no, UartBitsNum4Char len) |
| void ICACHE_FLASH_ATTR | uart_set_stop_bits (uint8_t uart_no, UartStopBitsNum bit_num) |
| void ICACHE_FLASH_ATTR | uart_set_line_inverse (uint8_t uart_no, UART_LineLevelInverse inverse_mask) |
| void ICACHE_FLASH_ATTR | uart_set_parity (uint8_t uart_no, UartParityMode Parity_mode) |
| void ICACHE_FLASH_ATTR | uart_set_baudrate (uint8_t uart_no, uint32_t baud_rate) |
| #define UART0 0 |
Definition at line 37 of file uart.h.
Referenced by en61107_delayed_uart_change_setting_timer_func(), en61107_uart_send_en61107(), en61107_uart_send_en61107_ident(), en61107_uart_send_inst_values(), en61107_uart_send_standard_data_1(), en61107_uart_send_standard_data_2(), uart0_rx_intr_handler(), uart0_sendStr(), uart0_tx_buffer(), uart0_write_char(), uart_config(), and uart_init().
| #define UART1 1 |
Definition at line 38 of file uart.h.
Referenced by uart1_write_char(), uart_config(), and uart_init().
| #define UART_LINE_INV_MASK (0x3f<<19) |
Definition at line 33 of file uart.h.
Referenced by uart_set_line_inverse().
| enum RcvMsgBuffState |
| Enumerator | |
|---|---|
| EMPTY | |
| UNDER_WRITE | |
| WRITE_OVER | |
| enum RcvMsgState |
| Enumerator | |
|---|---|
| BAUD_RATE_DET | |
| WAIT_SYNC_FRM | |
| SRCH_MSG_HEAD | |
| RCV_MSG_BODY | |
| RCV_ESC_CHAR | |
Definition at line 126 of file uart.h.
| enum TCPState |
| Enumerator | |
|---|---|
| RUN | |
| BLOCK | |
Definition at line 177 of file uart.h.
| enum UART_HwFlowCtrl |
| Enumerator | |
|---|---|
| USART_HardwareFlowControl_None | |
| USART_HardwareFlowControl_RTS | |
| USART_HardwareFlowControl_CTS | |
| USART_HardwareFlowControl_CTS_RTS | |
| enum UartBautRate |
Definition at line 74 of file uart.h.
| enum UartBitsNum4Char |
| enum UartExistParity |
| enum UartFlowCtrl |
| enum UartParityMode |
| enum UartStopBitsNum |
| void uart0_sendStr | ( | const char * | str | ) |
Definition at line 181 of file uart.c.
References LOCAL, UART0, and uart_tx_one_char().
Definition at line 163 of file uart.c.
References ICACHE_FLASH_ATTR, UART0, and uart_tx_one_char().
Referenced by en61107_uart_send_en61107(), en61107_uart_send_en61107_ident(), en61107_uart_send_inst_values(), en61107_uart_send_standard_data_1(), en61107_uart_send_standard_data_2(), kmp_get_register_timer_func(), and kmp_get_serial_timer_func().
| void uart1_sendStr_no_wait | ( | const char * | str | ) |
| struct UartBuffer* Uart_Buf_Init | ( | ) |
| void uart_init | ( | UartBautRate | uart0_br, |
| UartBautRate | uart1_br | ||
| ) |
Definition at line 273 of file uart.c.
References UartDevice::baut_rate, UartDevice::data_bits, EIGHT_BITS, ETS_UART_INTR_ENABLE, EVEN_BITS, UartDevice::exist_parity, ICACHE_FLASH_ATTR, NONE_BITS, os_install_putc1, UartDevice::parity, SEVEN_BITS, STICK_PARITY_DIS, STICK_PARITY_EN, UartDevice::stop_bits, TWO_STOP_BIT, UART0, uart0_write_char(), UART1, and uart_config().
| void uart_rx_intr_disable | ( | uint8 | uart_no | ) |
| void uart_rx_intr_enable | ( | uint8 | uart_no | ) |
| void ICACHE_FLASH_ATTR uart_set_baudrate | ( | uint8_t | uart_no, |
| uint32_t | baud_rate | ||
| ) |
| void ICACHE_FLASH_ATTR uart_set_line_inverse | ( | uint8_t | uart_no, |
| UART_LineLevelInverse | inverse_mask | ||
| ) |
Definition at line 321 of file uart.c.
References CLEAR_PERI_REG_MASK, ICACHE_FLASH_ATTR, SET_PERI_REG_MASK, UART_CONF0, and UART_LINE_INV_MASK.
| void ICACHE_FLASH_ATTR uart_set_parity | ( | uint8_t | uart_no, |
| UartParityMode | Parity_mode | ||
| ) |
Definition at line 327 of file uart.c.
References CLEAR_PERI_REG_MASK, ICACHE_FLASH_ATTR, NONE_BITS, SET_PERI_REG_MASK, UART_CONF0, UART_PARITY, and UART_PARITY_EN.
Referenced by en61107_uart_send_en61107(), en61107_uart_send_en61107_ident(), en61107_uart_send_inst_values(), en61107_uart_send_standard_data_1(), and en61107_uart_send_standard_data_2().
| void ICACHE_FLASH_ATTR uart_set_stop_bits | ( | uint8_t | uart_no, |
| UartStopBitsNum | bit_num | ||
| ) |
Definition at line 316 of file uart.c.
References ICACHE_FLASH_ATTR, SET_PERI_REG_BITS, UART_CONF0, UART_STOP_BIT_NUM, and UART_STOP_BIT_NUM_S.
Referenced by en61107_delayed_uart_change_setting_timer_func(), en61107_uart_send_en61107(), en61107_uart_send_en61107_ident(), en61107_uart_send_inst_values(), en61107_uart_send_standard_data_1(), and en61107_uart_send_standard_data_2().
| void ICACHE_FLASH_ATTR uart_set_word_length | ( | uint8_t | uart_no, |
| UartBitsNum4Char | len | ||
| ) |
Definition at line 311 of file uart.c.
References ICACHE_FLASH_ATTR, SET_PERI_REG_BITS, UART_BIT_NUM, UART_BIT_NUM_S, and UART_CONF0.
Referenced by en61107_uart_send_en61107(), en61107_uart_send_en61107_ident(), en61107_uart_send_inst_values(), en61107_uart_send_standard_data_1(), and en61107_uart_send_standard_data_2().
Definition at line 104 of file uart.c.
References ICACHE_FLASH_ATTR, OK, READ_PERI_REG, UART_FIFO, UART_STATUS, UART_TXFIFO_CNT, UART_TXFIFO_CNT_S, and WRITE_PERI_REG.
Referenced by uart0_sendStr(), uart0_tx_buffer(), uart0_write_char(), and uart1_write_char().
1.8.13