uart.h
来自「AVR平台下的CanOpen协议桟源码包括应用」· C头文件 代码 · 共 32 行
H
32 行
/* ------------------------------------------------------------------------
File : uart.h
Descr : Include file for the AVR's onchip UART.
History: 11APR.00; Henk B&B; Created.
--------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------ */
/* The AVR baud rate generator generates a baud rate according to:
baudrate = clockfreqency / 16*(UBRR + 1)
with UBRR is the contents of the UART Baud Rate Register.
With a clock of 4 MHz:
baudrate UBRR %Err
-------- ---- ----
2400 103 0.2
4800 51 0.2
9600 25 0.2
19200 12 0.2
*/
#define BAUD_9600 25
#define BAUD_4800 51
/* ------------------------------------------------------------------------ */
/* Function prototypes */
void uart_init( BYTE baud );
/* ------------------------------------------------------------------------ */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?