|
libxr
1.0
Want to be the best embedded framework
|
Public Member Functions | |
| ESP32UART (uart_port_t port, int tx_pin, int rx_pin, uint32_t buffer_size=256, uint32_t rx_thread_stack_depth=1024, uint32_t rx_thread_priority=10) | |
| ErrorCode | SetConfig (UART::Configuration config) override |
| 设置 UART 配置 / Sets the UART configuration | |
Public Member Functions inherited from LibXR::UART | |
| template<typename ReadPortType = ReadPort, typename WritePortType = WritePort> | |
| UART (ReadPortType *read_port, WritePortType *write_port) | |
| UART 构造函数 / UART constructor. | |
| template<typename OperationType , typename = std::enable_if_t<std::is_base_of_v< WriteOperation, std::decay_t<OperationType>>>> | |
| ErrorCode | Write (ConstRawData data, OperationType &&op) |
| template<typename OperationType , typename = std::enable_if_t<std::is_base_of_v< ReadOperation, std::decay_t<OperationType>>>> | |
| ErrorCode | Read (RawData data, OperationType &&op) |
Static Public Member Functions | |
| static ErrorCode | WriteFun (WritePort &port) |
| static ErrorCode | ReadFun (ReadPort &port) |
Private Member Functions | |
| void | HandleEvent (const uart_event_t &event) |
Static Private Member Functions | |
| static void | RxTask (void *param) |
| static void | TxTask (void *param) |
Private Attributes | |
| uart_port_t | port_ |
| QueueHandle_t | event_queue_ |
| RawData | rx_buff_ |
| RawData | tx_buff_ |
| ESP32UARTReadPort | _read_port |
| ESP32UARTWritePort | _write_port |
Friends | |
| class | ESP32UARTReadPort |
| class | ESP32UARTWritePort |
Additional Inherited Members | |
Public Types inherited from LibXR::UART | |
| enum class | Parity : uint8_t { NO_PARITY = 0 , EVEN = 1 , ODD = 2 } |
| 奇偶校验模式 / Parity mode More... | |
Data Fields inherited from LibXR::UART | |
| ReadPort * | read_port_ |
| 读取端口 / Read port | |
| WritePort * | write_port_ |
| 写入端口 / Write port | |
Definition at line 55 of file esp_uart.hpp.
| ESP32UART::ESP32UART | ( | uart_port_t | port, |
| int | tx_pin, | ||
| int | rx_pin, | ||
| uint32_t | buffer_size = 256, | ||
| uint32_t | rx_thread_stack_depth = 1024, | ||
| uint32_t | rx_thread_priority = 10 ) |
Definition at line 56 of file esp_uart.cpp.
|
private |
Definition at line 99 of file esp_uart.cpp.
|
static |
Definition at line 153 of file esp_uart.cpp.
|
staticprivate |
Definition at line 86 of file esp_uart.cpp.
|
overridevirtual |
设置 UART 配置 / Sets the UART configuration
ErrorCode::OK,否则返回相应错误码 / Returns the operation status, ErrorCode::OK if successful, otherwise an error code该方法为纯虚函数,子类必须实现具体的 UART 配置逻辑。 This is a pure virtual function. Subclasses must implement the specific UART configuration logic.
Implements LibXR::UART.
Definition at line 173 of file esp_uart.cpp.
|
static |
Definition at line 130 of file esp_uart.cpp.
|
friend |
Definition at line 66 of file esp_uart.hpp.
|
friend |
Definition at line 67 of file esp_uart.hpp.
|
private |
Definition at line 79 of file esp_uart.hpp.
|
private |
Definition at line 80 of file esp_uart.hpp.
|
private |
Definition at line 75 of file esp_uart.hpp.
|
private |
Definition at line 74 of file esp_uart.hpp.
|
private |
Definition at line 76 of file esp_uart.hpp.
|
private |
Definition at line 77 of file esp_uart.hpp.