* Use interrupts and buffering for UART TX

* Set up P0.26 as an output, driving the on-board LED
* Toggle the LED while waiting for UART input to demonstrate activity
This commit is contained in:
2011-05-22 10:34:44 +00:00
parent e1b1b60a53
commit 4eaff797c9
2 changed files with 87 additions and 3 deletions

8
main.c
View File

@@ -6,11 +6,19 @@
#include "interrupt.h"
#define PINSEL0 (*((volatile unsigned char *) 0xE002C000))
#define FP0XDIR (*((volatile unsigned int *) 0x3FFFC000))
#define FP0XVAL (*((volatile unsigned int *) 0x3FFFC014))
#define SCS (*((volatile unsigned int *) 0xe01fc1a0))
void init_pins(void)
{
PINSEL0 = 0x00000055; /* P0.0 and P0.1 assigned to UART */
/* P0.2 and P0.3 assigned to I2C */
SCS = 1;
FP0XDIR = 0x04000000; /* P0.26 is an output */
FP0XVAL = 0x0;
}
void reply(char *str)