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