feat(uart_test): add test case for uart tx blocked by auto-suspend

This commit is contained in:
Michael (XIAO Xufeng)
2022-12-20 23:49:49 +08:00
committed by Xiao Xufeng
parent 9b0d803237
commit c6d4c1a7bf
4 changed files with 42 additions and 21 deletions

View File

@@ -15,21 +15,14 @@
#include "soc/uart_pins.h"
#include "soc/soc_caps.h"
#include "soc/clk_tree_defs.h"
#include "test_common.h"
#define BUF_SIZE (100)
#define UART_BAUD_11520 (11520)
#define UART_BAUD_115200 (115200)
#define TOLERANCE (0.02) //baud rate error tolerance 2%.
typedef struct {
uart_port_t port_num;
soc_module_clk_t default_src_clk;
int tx_pin_num;
int rx_pin_num;
uint32_t rx_flow_ctrl_thresh;
} uart_port_param_t;
static bool port_select(uart_port_param_t *port_param)
bool port_select(uart_port_param_t *port_param)
{
char argv[10];
unity_wait_for_signal_param("select to test 'uart' or 'lp_uart' port", argv, sizeof(argv));