From fff8a18b9920ad1e767d125d7b7d2792895b6e19 Mon Sep 17 00:00:00 2001 From: Jim Paris Date: Wed, 25 Jun 2014 17:44:22 -0400 Subject: [PATCH] Fix ADI radio engine driver and add hook for packet reception --- cpu/arm/aducrf101/Common/radioeng.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cpu/arm/aducrf101/Common/radioeng.c b/cpu/arm/aducrf101/Common/radioeng.c index 5ad2529b7..c4431c832 100644 --- a/cpu/arm/aducrf101/Common/radioeng.c +++ b/cpu/arm/aducrf101/Common/radioeng.c @@ -259,8 +259,8 @@ static TyRadioConfiguration RadioConfiguration; static RIE_BOOL bRadioConfigurationChanged = RIE_FALSE; static RIE_BOOL bTestModeEnabled = RIE_FALSE; static RIE_U32 DataRate = 38400; -static RIE_BOOL bPacketTx = RIE_FALSE; -static RIE_BOOL bPacketRx = RIE_FALSE; +static volatile RIE_BOOL bPacketTx = RIE_FALSE; +static volatile RIE_BOOL bPacketRx = RIE_FALSE; const RIE_U8 DR_38_4kbps_Dev20kHz_Configuration[] = { @@ -1457,6 +1457,7 @@ static RIE_Responses RadioWaitForPowerUp(void) \fn void Ext_Int8_Handler(void) \brief Radio Interrupt Handler **/ +extern void aducrf101_rx_packet_hook(void); void Ext_Int8_Handler (void) { RIE_Responses Response = RIE_Success; @@ -1469,8 +1470,10 @@ void Ext_Int8_Handler (void) Response = RadioMMapRead(MCR_interrupt_source_1_Adr,0x1,&ucInt1); if (ucInt0 & interrupt_mask_0_interrupt_tx_eof) bPacketTx = RIE_TRUE; - if (ucInt0 & interrupt_mask_0_interrupt_crc_correct) + if (ucInt0 & interrupt_mask_0_interrupt_crc_correct) { bPacketRx = RIE_TRUE; + aducrf101_rx_packet_hook(); + } // Clear all the interrupts that we have just handleed if (Response == RIE_Success) Response = RadioMMapWrite(MCR_interrupt_source_0_Adr,0x1, &ucInt0);