mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-05-02 12:07:02 +00:00
sync with core3 features
This commit is contained in:
@@ -68,6 +68,14 @@ void EMSuart::uart_event_task(void * pvParameters) {
|
||||
// initialize UART driver
|
||||
void EMSuart::start(const uint8_t tx_mode, const uint8_t rx_gpio, const uint8_t tx_gpio) {
|
||||
if (tx_mode_ == EMS_TXMODE_INIT) {
|
||||
#if CONFIG_IDF_TARGET_ESP32C6
|
||||
uart_config_t uart_config = {.baud_rate = EMSUART_BAUD,
|
||||
.data_bits = UART_DATA_8_BITS,
|
||||
.parity = UART_PARITY_DISABLE,
|
||||
.stop_bits = UART_STOP_BITS_1,
|
||||
.flow_ctrl = UART_HW_FLOWCTRL_DISABLE,
|
||||
.rx_flow_ctrl_thresh = 0};
|
||||
#else
|
||||
uart_config_t uart_config = {.baud_rate = EMSUART_BAUD,
|
||||
.data_bits = UART_DATA_8_BITS,
|
||||
.parity = UART_PARITY_DISABLE,
|
||||
@@ -80,6 +88,7 @@ void EMSuart::start(const uint8_t tx_mode, const uint8_t rx_gpio, const uint8_t
|
||||
.flags = {0, 0}
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
#if defined(EMSUART_RX_INVERT)
|
||||
inverse_mask |= UART_SIGNAL_RXD_INV;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user