?? mcu_uart.h
字號:
#ifndef MCU_UART_H
#define MCU_UART_H
#ifdef __cplusplus
extern "C"
{
#endif
#define TX_BUF_SIZE 150
#define TX_BUF_HALF_SIZE 20
#define MCU_UART_RX_BUF_SIZE 160
#define MCU_UART_TX_BUF_SIZE 150
/* MCU 接收狀態 */
#define MCU_RX_STAR 0 // 準備接收
#define MCU_RX_END 1 // 接收完成
#define MCU_RX_DEAL 3 // 正在接收
#define MCU_RX_ERROR 4 // 接收出錯
extern unsigned char mcu_rx_buf[MCU_UART_RX_BUF_SIZE];
sreg extern unsigned char mcu_tx_buf[MCU_UART_TX_BUF_SIZE];
extern unsigned char mcu_rx_len;
extern unsigned char mcu_tx_len;
extern unsigned char mcu_rx_flag;
extern volatile unsigned char modem_tx_recv_ptr;
extern volatile unsigned char modem_tx_send_ptr;
extern volatile unsigned char modem_tx_status;
extern volatile unsigned char mcu_tx_recv_ptr;
extern volatile unsigned char mcu_tx_send_ptr;
extern volatile unsigned char mcu_tx_status;
#define MCU_RX_WAIT_TIME 10
#define MCU_TX_WAIT_TIME 35
#define FRAME_TX_START 0
#define FRAME_TX_PROCESS 1
#define FRAME_TX_END 2
int mcu_uart_init(void);
int mcu_uart_start_to_tx(unsigned char * dPtr, unsigned char len);
int mcu_uart_start_to_rx(void);
int mcu_uart_check(void);
int set_mcu_uart_baud_rate(void);
#ifdef __cplusplus
}
#endif
#endif /* MCU_UART_H */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -