2024-03-28 12:19:52 +08:00
|
|
|
/**
|
|
|
|
|
* @file uart_port.h
|
|
|
|
|
* @author LokLiang
|
|
|
|
|
* @brief
|
|
|
|
|
* @version 0.1
|
|
|
|
|
* @date 2023-09-04
|
|
|
|
|
*
|
|
|
|
|
* @copyright Copyright (c) 2023
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2025-02-21 12:43:26 +08:00
|
|
|
#include "drivers/data_port/sb_data_port.h"
|
2024-03-28 12:19:52 +08:00
|
|
|
#include "os/os.h"
|
|
|
|
|
|
|
|
|
|
int sb_uart_port_init(void);
|
|
|
|
|
|
|
|
|
|
sb_data_port_t *sb_uart_port_bind(int uartNum,
|
|
|
|
|
int baudrate,
|
|
|
|
|
int tx_pin,
|
|
|
|
|
int rx_pin,
|
|
|
|
|
int rx_task_priority,
|
|
|
|
|
uint16_t buffer_size,
|
|
|
|
|
uint8_t frame_ms,
|
|
|
|
|
os_work_t *rx_resume_work);
|
|
|
|
|
|
|
|
|
|
void sb_uart_port_unbind(sb_data_port_t *port);
|
2025-10-14 10:17:40 +08:00
|
|
|
|
|
|
|
|
//切换校验方式
|
|
|
|
|
void uart_set_parity_switch(sb_data_port_t *port, uint8_t parity);
|