uart.h

来自「Visuabaic interface with com connect to 」· C头文件 代码 · 共 27 行

H
27
字号
#ifndef UART_H_INCLUDED
#define UART_H_INCLUDED


    #define RX_BUFFER_SIZE 256                  //!< rx_buffer size
    #define RX_BUFFER_MASK  RX_BUFFER_SIZE - 2  //!< Used to set overflow flag
    #define RX_WAIT        65000                //!< Timeout value
    #define OK_     0                           //!< Used to look up in COM_setSearchString( unsigned char Response )
    #define CMTI_   1                           //!< Used to look up in COM_setSearchString( unsigned char Response )
    #define READY_  2                           //!< Used to look up in COM_setSearchString( unsigned char Response )
    #define CRLF_   3                           //!< Used to look up in COM_setSearchString( unsigned char Response )


    // Prototypes
    void COM_init( unsigned int baudrate );
    void COM_rx_reset( void );
    void COM_rx_on( void );
    void COM_rx_off( void );
    void COM_setSearchString( unsigned char Response );
    int  COM_putchar( unsigned char data );
    void COM_put_integer( int i );
    void COM_puts(unsigned char *str);
    void COM_putsf( const unsigned char  *fstr );
    int COM_trim( void );
    unsigned char* COM_gets( void );
#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?