📄 serial0_teststub.c
字号:
/************************************************************/
/* PROJECT NAME: SERIAL */
/* Project: LPC2129 Training course */
/* Engineer: Y.Stalin stalin@nstlindia.com */
/* Filename: SERIAL0_Driver.c */
/* Language: C */
/* Compiler: Keil ARM GCC */
/* Assembler: */
/* */
/************************************************************/
/* COPYRIGHT: NSTL 2008 */
/* LICENSE: PROPRIETORY */
/************************************************************/
/* Function: */
/* */
/* Example */
/* */
/* Demonstrates Use of the LPC2129 GPIO */
/* */
/* Oscillator frequency 12.000 Mhz */
/* Target board NSTL NST2100 */
/************************************************************/
#include <LPC214X.H>
//#include "gpio.h"
//#include "lcd.h"
//#include "common.h"
#include "serial0.h"
int main(void)
{
setClock();
InitSerial0(9600);
InitSerial0Int((unsigned)serial0_RxISR);
putStrS0("Welcome to NSTL");
while(1);
}
void serial0_RxISR(void) __irq
{
unsigned char ch;
ch = getCharS0();
putCharS0(ch);
VICVectAddr = 0x00000000; //Dummy write to signal end of interrupt
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -