Added some porting to AT91SAM7S while playing with IAR compiler.
This commit is contained in:
@@ -28,6 +28,16 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#if defined(__ICCARM__)
|
||||
#include <intrinsics.h>
|
||||
#define isr_enable() __enable_interrupt()
|
||||
#define isr_disable() __disable_interrupt()
|
||||
#endif
|
||||
#if defined(__GNUC__)
|
||||
#define isr_enable() enableIRQ();enableFIQ();
|
||||
#define isr_disable() disableFIQ();disableIRQ();
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
@@ -185,8 +185,7 @@ int main(
|
||||
init();
|
||||
bacnet_init();
|
||||
/* enable interrupts */
|
||||
enableIRQ();
|
||||
enableFIQ();
|
||||
isr_enable();
|
||||
/* broadcast an I-Am on startup */
|
||||
Send_I_Am(&Handler_Transmit_Buffer[0]);
|
||||
/* endless blink loop */
|
||||
|
||||
@@ -303,7 +303,7 @@ static void Timer0IrqHandler(
|
||||
{
|
||||
|
||||
volatile AT91PS_TC pTC = AT91C_BASE_TC0; /* pointer to timer channel 0 register structure */
|
||||
unsigned int dummy; /* temporary */
|
||||
volatile unsigned int dummy; /* temporary */
|
||||
|
||||
/* read TC0 Status Register to clear interrupt */
|
||||
dummy = pTC->TC_SR;
|
||||
|
||||
Reference in New Issue
Block a user