aboutsummaryrefslogtreecommitdiffstats
path: root/ports/MSP430
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-01-10 16:21:27 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-01-10 16:21:27 +0000
commite2b6b440e12562804f161d8db677554bbd666bd1 (patch)
tree71ceaeec75f2ecf2d1ab601414cb4190f3f44ca0 /ports/MSP430
parentb7eba42be8e04a6a9cbade60d5ae0190fd34efae (diff)
downloadChibiOS-e2b6b440e12562804f161d8db677554bbd666bd1.tar.gz
ChibiOS-e2b6b440e12562804f161d8db677554bbd666bd1.tar.bz2
ChibiOS-e2b6b440e12562804f161d8db677554bbd666bd1.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@612 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'ports/MSP430')
-rw-r--r--ports/MSP430/chcore.h10
-rw-r--r--ports/MSP430/msp430_serial.c25
2 files changed, 21 insertions, 14 deletions
diff --git a/ports/MSP430/chcore.h b/ports/MSP430/chcore.h
index 7f27c3f8b..b090cffba 100644
--- a/ports/MSP430/chcore.h
+++ b/ports/MSP430/chcore.h
@@ -176,10 +176,18 @@ if (chSchRescRequiredI()) \
*/
#define sys_enable_from_isr()
-#if ENABLE_WFI_IDLE != 0
+/**
+ * Disables all the interrupt sources, even those having a priority higher
+ * to the kernel.
+ * In this port it is no different than sys_disable() because the simple
+ * interrupt handling
+ */
+#define sys_disable_all() sys_disable()
+
/**
* This port function is implemented as inlined code for performance reasons.
*/
+#if ENABLE_WFI_IDLE != 0
#define sys_wait_for_interrupt() { \
asm volatile ("wfi"); \
}
diff --git a/ports/MSP430/msp430_serial.c b/ports/MSP430/msp430_serial.c
index 27094edeb..58a44a076 100644
--- a/ports/MSP430/msp430_serial.c
+++ b/ports/MSP430/msp430_serial.c
@@ -44,10 +44,10 @@ FullDuplexDriver COM1;
static uint8_t ib1[SERIAL_BUFFERS_SIZE];
static uint8_t ob1[SERIAL_BUFFERS_SIZE];
-SYS_IRQ_HANDLER(USART0TX_VECTOR) u0txirq(void) {
+CH_IRQ_HANDLER(USART0TX_VECTOR) u0txirq(void) {
msg_t b;
- SYS_IRQ_PROLOGUE();
+ CH_IRQ_PROLOGUE();
chSysLockI();
b = chFDDRequestDataI(&COM1);
@@ -57,13 +57,13 @@ SYS_IRQ_HANDLER(USART0TX_VECTOR) u0txirq(void) {
else
U0TXBUF = b;
- SYS_IRQ_EPILOGUE();
+ CH_IRQ_EPILOGUE();
}
-SYS_IRQ_HANDLER(USART0RX_VECTOR) u0rxirq(void) {
+CH_IRQ_HANDLER(USART0RX_VECTOR) u0rxirq(void) {
uint8_t urctl;
- SYS_IRQ_PROLOGUE();
+ CH_IRQ_PROLOGUE();
if ((urctl = U0RCTL) & RXERR)
SetError(urctl, &COM1);
@@ -71,7 +71,7 @@ SYS_IRQ_HANDLER(USART0RX_VECTOR) u0rxirq(void) {
chFDDIncomingDataI(&COM1, U0RXBUF);
chSysUnlockI();
- SYS_IRQ_EPILOGUE();
+ CH_IRQ_EPILOGUE();
}
/*
@@ -116,10 +116,10 @@ FullDuplexDriver COM2;
static uint8_t ib2[SERIAL_BUFFERS_SIZE];
static uint8_t ob2[SERIAL_BUFFERS_SIZE];
-SYS_IRQ_HANDLER(USART1TX_VECTOR) u1txirq(void) {
+CH_IRQ_HANDLER(USART1TX_VECTOR) u1txirq(void) {
msg_t b;
- SYS_IRQ_PROLOGUE();
+ CH_IRQ_PROLOGUE();
chSysLockI();
b = chFDDRequestDataI(&COM2);
@@ -129,13 +129,13 @@ SYS_IRQ_HANDLER(USART1TX_VECTOR) u1txirq(void) {
else
U1TXBUF = b;
- SYS_IRQ_EPILOGUE();
+ CH_IRQ_EPILOGUE();
}
-SYS_IRQ_HANDLER(USART1RX_VECTOR) u1rxirq(void) {
+CH_IRQ_HANDLER(USART1RX_VECTOR) u1rxirq(void) {
uint8_t urctl;
- SYS_IRQ_PROLOGUE();
+ CH_IRQ_PROLOGUE();
if ((urctl = U1RCTL) & RXERR)
SetError(urctl, &COM2);
@@ -143,10 +143,9 @@ SYS_IRQ_HANDLER(USART1RX_VECTOR) u1rxirq(void) {
chFDDIncomingDataI(&COM2, U1RXBUF);
chSysUnlockI();
- SYS_IRQ_EPILOGUE();
+ CH_IRQ_EPILOGUE();
}
-
/*
* Invoked by the high driver when one or more bytes are inserted in the
* output queue.