feat(product-test): add UART automation flow
This commit is contained in:
@@ -37,6 +37,11 @@ typedef struct {
|
||||
bool has_paper;
|
||||
int8_t paper_gpio_level;
|
||||
uint8_t paper_present_level;
|
||||
bool battery_adc_ready;
|
||||
bool ntc_adc_ready;
|
||||
int battery_adc_raw;
|
||||
int ntc_adc_raw;
|
||||
uint16_t battery_mv;
|
||||
uint8_t battery_percent;
|
||||
float temperature_c;
|
||||
int64_t updated_ms;
|
||||
@@ -177,6 +182,21 @@ uint32_t runtime_policy_image_download_timeout_default_ms(void);
|
||||
uint32_t runtime_policy_image_download_timeout_min_ms(void);
|
||||
uint32_t runtime_policy_image_download_timeout_max_ms(void);
|
||||
|
||||
// ---------- product_test_uart ----------
|
||||
typedef struct {
|
||||
int port;
|
||||
int baud_rate;
|
||||
int tx_pin;
|
||||
int rx_pin;
|
||||
size_t rx_buffer_size;
|
||||
size_t tx_buffer_size;
|
||||
} platform_test_uart_config_t;
|
||||
|
||||
esp_err_t platform_test_uart_init(const platform_test_uart_config_t *cfg);
|
||||
void platform_test_uart_deinit(void);
|
||||
esp_err_t platform_test_uart_read_byte(uint8_t *out_byte, uint32_t timeout_ms);
|
||||
esp_err_t platform_test_uart_write_line(const char *line, uint32_t timeout_ms);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user