aboutsummaryrefslogtreecommitdiffstats
path: root/os/io/platforms/LPC214x
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-08-27 16:42:07 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-08-27 16:42:07 +0000
commit8b55cb9767ce881b7a22c5af34605ed3a261582d (patch)
tree2b1e4239c2909496d83058a0a16da65525c9e70c /os/io/platforms/LPC214x
parentb8e618f59a5bc34aa76e2aacd6484ad217c54e33 (diff)
downloadChibiOS-8b55cb9767ce881b7a22c5af34605ed3a261582d.tar.gz
ChibiOS-8b55cb9767ce881b7a22c5af34605ed3a261582d.tar.bz2
ChibiOS-8b55cb9767ce881b7a22c5af34605ed3a261582d.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1109 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/io/platforms/LPC214x')
-rw-r--r--os/io/platforms/LPC214x/lpc214x_ssp.c4
-rw-r--r--os/io/platforms/LPC214x/pal_lld.h4
-rw-r--r--os/io/platforms/LPC214x/serial_lld.c28
-rw-r--r--os/io/platforms/LPC214x/serial_lld.h4
4 files changed, 20 insertions, 20 deletions
diff --git a/os/io/platforms/LPC214x/lpc214x_ssp.c b/os/io/platforms/LPC214x/lpc214x_ssp.c
index fb7b70183..af9915395 100644
--- a/os/io/platforms/LPC214x/lpc214x_ssp.c
+++ b/os/io/platforms/LPC214x/lpc214x_ssp.c
@@ -44,7 +44,7 @@ void sspAcquireBus(void) {
#if LPC214x_SSP_USE_MUTEX
chSemWait(&me);
#endif
- palClearPad(IOPORT_A, 20);
+ palClearPad(IOPORT1, 20);
}
/**
@@ -54,7 +54,7 @@ void sspAcquireBus(void) {
*/
void sspReleaseBus(void) {
- palClearPad(IOPORT_A, 20);
+ palClearPad(IOPORT1, 20);
#if LPC214x_SSP_USE_MUTEX
chSemSignal(&me);
#endif
diff --git a/os/io/platforms/LPC214x/pal_lld.h b/os/io/platforms/LPC214x/pal_lld.h
index 50e0ff4a5..4547abc61 100644
--- a/os/io/platforms/LPC214x/pal_lld.h
+++ b/os/io/platforms/LPC214x/pal_lld.h
@@ -93,12 +93,12 @@ typedef FIO * ioportid_t;
/**
* @brief FIO port 0 identifier.
*/
-#define IOPORT_A FIO0Base
+#define IOPORT1 FIO0Base
/**
* @brief FIO port 1 identifier.
*/
-#define IOPORT_B FIO1Base
+#define IOPORT2 FIO1Base
/*===========================================================================*/
/* Implementation, some of the following macros could be implemented as */
diff --git a/os/io/platforms/LPC214x/serial_lld.c b/os/io/platforms/LPC214x/serial_lld.c
index 09884a3fe..b97d42185 100644
--- a/os/io/platforms/LPC214x/serial_lld.c
+++ b/os/io/platforms/LPC214x/serial_lld.c
@@ -32,12 +32,12 @@
#if USE_LPC214x_UART0 || defined(__DOXYGEN__)
/** @brief UART0 serial driver identifier.*/
-SerialDriver COM1;
+SerialDriver SD1;
#endif
#if USE_LPC214x_UART1 || defined(__DOXYGEN__)
/** @brief UART1 serial driver identifier.*/
-SerialDriver COM2;
+SerialDriver SD2;
#endif
/** @brief Driver default configuration.*/
@@ -199,13 +199,13 @@ static void preload(UART *u, SerialDriver *sdp) {
static void notify1(void) {
#if UART_FIFO_PRELOAD > 0
- preload(U0Base, &COM1);
+ preload(U0Base, &SD1);
#else
UART *u = U0Base;
if (u->UART_LSR & LSR_THRE) {
chSysLockFromIsr();
- u->UART_THR = chOQGetI(&COM1.sd_oqueue);
+ u->UART_THR = chOQGetI(&SD1.sd_oqueue);
chSysUnlockFromIsr();
}
u->UART_IER |= IER_THRE;
@@ -217,12 +217,12 @@ static void notify1(void) {
static void notify2(void) {
#if UART_FIFO_PRELOAD > 0
- preload(U1Base, &COM2);
+ preload(U1Base, &SD2);
#else
UART *u = U1Base;
if (u->UART_LSR & LSR_THRE)
- u->UART_THR = chOQGetI(&COM2.sd_oqueue);
+ u->UART_THR = chOQGetI(&SD2.sd_oqueue);
u->UART_IER |= IER_THRE;
#endif
}
@@ -237,7 +237,7 @@ CH_IRQ_HANDLER(UART0IrqHandler) {
CH_IRQ_PROLOGUE();
- serve_interrupt(U0Base, &COM1);
+ serve_interrupt(U0Base, &SD1);
VICVectAddr = 0;
CH_IRQ_EPILOGUE();
@@ -249,7 +249,7 @@ CH_IRQ_HANDLER(UART1IrqHandler) {
CH_IRQ_PROLOGUE();
- serve_interrupt(U1Base, &COM2);
+ serve_interrupt(U1Base, &SD2);
VICVectAddr = 0;
CH_IRQ_EPILOGUE();
@@ -267,11 +267,11 @@ CH_IRQ_HANDLER(UART1IrqHandler) {
void sd_lld_init(void) {
#if USE_LPC214x_UART0
- sdObjectInit(&COM1, NULL, notify1);
+ sdObjectInit(&SD1, NULL, notify1);
SetVICVector(UART0IrqHandler, LPC214x_UART1_PRIORITY, SOURCE_UART0);
#endif
#if USE_LPC214x_UART1
- sdObjectInit(&COM2, NULL, notify2);
+ sdObjectInit(&SD2, NULL, notify2);
SetVICVector(UART1IrqHandler, LPC214x_UART2_PRIORITY, SOURCE_UART1);
#endif
}
@@ -290,7 +290,7 @@ void sd_lld_start(SerialDriver *sdp, const SerialDriverConfig *config) {
config = &default_config;
#if USE_LPC214x_UART1
- if (&COM1 == sdp) {
+ if (&SD1 == sdp) {
PCONP = (PCONP & PCALL) | PCUART0;
uart_init(U0Base, config);
VICIntEnable = INTMASK(SOURCE_UART0);
@@ -298,7 +298,7 @@ void sd_lld_start(SerialDriver *sdp, const SerialDriverConfig *config) {
}
#endif
#if USE_LPC214x_UART2
- if (&COM2 == sdp) {
+ if (&SD2 == sdp) {
PCONP = (PCONP & PCALL) | PCUART1;
uart_init(U1Base, config);
VICIntEnable = INTMASK(SOURCE_UART1);
@@ -317,7 +317,7 @@ void sd_lld_start(SerialDriver *sdp, const SerialDriverConfig *config) {
void sd_lld_stop(SerialDriver *sdp) {
#if USE_LPC214x_UART1
- if (&COM1 == sdp) {
+ if (&SD1 == sdp) {
uart_deinit(U0Base);
PCONP = (PCONP & PCALL) & ~PCUART0;
VICIntEnClear = INTMASK(SOURCE_UART0);
@@ -325,7 +325,7 @@ void sd_lld_stop(SerialDriver *sdp) {
}
#endif
#if USE_LPC214x_UART2
- if (&COM2 == sdp) {
+ if (&SD2 == sdp) {
uart_deinit(U1Base);
PCONP = (PCONP & PCALL) & ~PCUART1;
VICIntEnClear = INTMASK(SOURCE_UART1);
diff --git a/os/io/platforms/LPC214x/serial_lld.h b/os/io/platforms/LPC214x/serial_lld.h
index b543d844c..d4bc6d01d 100644
--- a/os/io/platforms/LPC214x/serial_lld.h
+++ b/os/io/platforms/LPC214x/serial_lld.h
@@ -156,10 +156,10 @@ typedef struct {
/** @cond never*/
#if USE_LPC214x_UART0
-extern SerialDriver COM1;
+extern SerialDriver SD1;
#endif
#if USE_LPC214x_UART1
-extern SerialDriver COM2;
+extern SerialDriver SD2;
#endif
#ifdef __cplusplus