Cross compiler interrupt service routine compatibility definitions for MSP430 based platforms based on isr_compat.h by Steve Underwood.

This commit is contained in:
Niclas Finne 2012-03-07 01:14:54 +01:00
parent 7eac4393c2
commit 684c3edfa6
31 changed files with 157 additions and 182 deletions

View file

@ -35,6 +35,7 @@
#include "sys/etimer.h"
#include "rtimer-arch.h"
#include "dev/watchdog.h"
#include "isr_compat.h"
#define INTERVAL (RTIMER_ARCH_SECOND / CLOCK_SECOND)
@ -46,13 +47,7 @@ static volatile clock_time_t count = 0;
/* last_tar is used for calculating clock_fine, last_ccr might be better? */
static volatile uint16_t last_tar = 0;
/*---------------------------------------------------------------------------*/
#ifdef __IAR_SYSTEMS_ICC__
#pragma vector=TIMER1_A1_VECTOR
__interrupt void
#else
interrupt(TIMER1_A1_VECTOR)
#endif
timera1 (void)
ISR(TIMER1_A1, timera1)
{
ENERGEST_ON(ENERGEST_TYPE_IRQ);

View file

@ -41,6 +41,7 @@
#include "sys/rtimer.h"
#include "sys/process.h"
#include "dev/watchdog.h"
#include "isr_compat.h"
#define DEBUG 0
#if DEBUG
@ -51,13 +52,7 @@
#endif
/*---------------------------------------------------------------------------*/
#ifdef __IAR_SYSTEMS_ICC__
#pragma vector=TIMER1_A0_VECTOR
__interrupt void
#else
interrupt(TIMER1_A0_VECTOR)
#endif
timera0 (void)
ISR(TIMER1_A0, timera0)
{
ENERGEST_ON(ENERGEST_TYPE_IRQ);

View file

@ -38,6 +38,7 @@
#include "sys/energest.h"
#include "dev/uart0.h"
#include "dev/watchdog.h"
#include "isr_compat.h"
static int (*uart0_input_handler)(unsigned char c);
@ -98,18 +99,12 @@ uart0_init(unsigned long ubr)
UCA0IE |= UCRXIE; /* Enable UCA0 RX interrupt */
}
/*---------------------------------------------------------------------------*/
#ifdef __IAR_SYSTEMS_ICC__
#pragma vector=USCI_A0_VECTOR
__interrupt void
#else
interrupt(USCI_A0_VECTOR)
#endif
uart0_rx_interrupt(void)
ISR(USCI_A0, uart0_rx_interrupt)
{
uint8_t c;
ENERGEST_ON(ENERGEST_TYPE_IRQ);
if (UCA0IV == 2) {
if(UCA0IV == 2) {
if(UCA0STAT & UCRXERR) {
c = UCA0RXBUF; /* Clear error flags by forcing a dummy read. */
} else {

View file

@ -38,6 +38,7 @@
#include "sys/energest.h"
#include "dev/uart1.h"
#include "dev/watchdog.h"
#include "isr_compat.h"
static int (*uart1_input_handler)(unsigned char c);
@ -103,13 +104,7 @@ uart1_init(unsigned long ubr)
UCA1IE |= UCRXIE; /* Enable UCA1 RX interrupt */
}
/*---------------------------------------------------------------------------*/
#ifdef __IAR_SYSTEMS_ICC__
#pragma vector=USCI_A1_VECTOR
__interrupt void
#else
interrupt(USCI_A1_VECTOR)
#endif
uart1_rx_interrupt(void)
ISR(USCI_A1, uart1_rx_interrupt)
{
uint8_t c;