Added some porting to AT91SAM7S while playing with IAR compiler.

This commit is contained in:
skarg
2013-01-08 20:51:29 +00:00
parent cf882642a8
commit a576c29ae4
3 changed files with 12 additions and 3 deletions
+10
View File
@@ -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 */
+1 -2
View File
@@ -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 */
+1 -1
View File
@@ -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;