main.c
来自「AT91SAM7S64的uart程序。包含完整的uart API 可以完成向串口」· C语言 代码 · 共 30 行
C
30 行
// This program shows how to work with USART port
// USART0 and USART 1 (respectively RS232_0 connector and RS232_1 connector) returns echo + *
// Notice: Jumper RXDO/DRXD must be in position RXDO
// Jumper TXDO/DTXD must be in position TXDO
#include "AT91SAM7S64.h"
#include "system.h"
#include "usart.h"
//it's a simple delay
void Delay (unsigned long a) { while (--a!=0); }
unsigned char string[]="hello world!";
int main()
{
/**** System init ****/
InitFrec();
/**** UART ****/
InitUSART0();
InitUSART1();
write_str_USART0(string);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?