📄 hello.c
字号:
/*------------------------------------------------------------------------------
HELLO.C
Copyright 1995-2002 Keil Software, Inc.
------------------------------------------------------------------------------*/
#include <stdio.h> /* prototype declarations for I/O functions */
#include <91M40800.H> /* AT91M40800 definitions */
/****************/
/* main program */
/****************/
int main (void) { /* execution starts here */
/* initialize the serial interface */
PIO_PDR = (1<<PIORXD0) | (1<<PIOTXD0); /* Enable RXD0 and TXD0 */
US0_MR = US_CHRL_8 | US_PAR_NO; /* 8 bits, no Parity, 1 Stop bit */
US0_BRGR = 260; /* 9600 Baud Rate @ 40 MHz Clock */
US0_CR = US_RXEN | US_TXEN; /* Enable RX and TX */
printf ("Hello World\n"); /* the 'printf' function call */
while (1) { /* An embedded program does not stop and */
; /* ... */ /* never returns. We've used an endless */
} /* loop. You may wish to put in your own */
} /* code were we've printed the dots (...). */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -