?? main.c
字號(hào):
/*----------------------------------------------------------------------------
* Name: main.c
* Purpose: Interrupt Driven SIO Using printf for Philips LPC2300
* Version: V1.0
*----------------------------------------------------------------------------
* This file is part of the uVision/ARM development tools.
* This software may only be used under the terms of a valid, current,
* end user licence from KEIL for a compatible version of KEIL software
* development tools. Nothing else gives you the right to use it.
*
* Copyright (c) 2005-2007 Keil Software.
*---------------------------------------------------------------------------*/
#include <LPC23XX.H> /* LPC23xx definitions */
#include <stdio.h>
#include "LCD.h"
#include "sio.h"
const char message [] =
"This is a test to see if the interrupt driven serial I/O routines work.";
int main (void) {
PINSEL10 = 0; /* Disable ETM interface */
FIO2DIR = 0x000000FF; /* LEDs, port 2, bit 0~7 output only */
FIO2MASK = 0x00000000;
FIO2PIN = 0x00000000;
LCD_init (); /* Initialize LCD display module */
LCD_cur_off ();
LCD_cls ();
LCD_puts ("MCB2300 UART IRQ");
LCD_puts (" www.keil.com ");
com_initialize (); /* init interrupt driven serial I/O */
printf ("Interrupt-driven Serial I/O Example\r\n\r\n");
while (1) {
unsigned char c;
printf ("Press a key. ");
c = getchar ();
printf ("\r\n");
printf ("You pressed '%c'.\r\n\r\n", c);
}
}
/*----------------------------------------------------------------------------
*---------------------------------------------------------------------------*/
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -