refactor(uart): add support to be able to test LP_UART port

Increase LP_UART_EMPTY_THRESH_DEFAULT value to 4. The original value
could cause the FIFO become empty before filling next data into the FIFO
when the buadrate is high. TX_DONE interrupt would raise before actual
transmission complete in such case.
This commit is contained in:
Song Ruo Jing
2024-01-24 22:29:13 +08:00
parent dce27c3b09
commit 5276cd4f1d
17 changed files with 347 additions and 141 deletions

View File

@@ -1,15 +1,11 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include "esp_err.h"
#include "esp_intr_alloc.h"
#include "soc/soc_caps.h"
@@ -17,6 +13,10 @@ extern "C" {
#include "freertos/queue.h"
#include "hal/uart_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/* @brief When calling `uart_set_pin`, instead of GPIO number, `UART_PIN_NO_CHANGE`
* can be provided to keep the currently allocated pin.
*/