mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-17 02:52:12 +01:00
RFM22b: Call the pendingISR routine from all the user space tasks. Got a valid connection with this.
This commit is contained in:
parent
f7cda1c0c4
commit
042055b29a
@ -315,13 +315,15 @@ static void radioReceiveTask(void *parameters)
|
||||
PIOS_WDG_UpdateFlag(PIOS_WDG_RADIORECEIVE);
|
||||
#endif /* PIOS_INCLUDE_WDG */
|
||||
|
||||
PIOS_RFM22_processPendingISR(5);
|
||||
|
||||
// Get a RX packet from the packet handler if required.
|
||||
if (p == NULL)
|
||||
p = PHGetRXPacket(pios_packet_handler);
|
||||
|
||||
if(p == NULL) {
|
||||
// Wait a bit for a packet to come available.
|
||||
PIOS_RFM22_processPendingISR(5);
|
||||
vTaskDelay(5);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -522,8 +524,8 @@ static void radioStatusTask(void *parameters)
|
||||
}
|
||||
}
|
||||
|
||||
// Delay until the next update period.
|
||||
vTaskDelay(STATS_UPDATE_PERIOD_MS / portTICK_RATE_MS);
|
||||
for(int i = 0; i < 20; i++)
|
||||
PIOS_RFM22_processPendingISR(5);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -725,8 +725,7 @@ uint8_t rfm22_read(uint8_t addr)
|
||||
|
||||
uint32_t rfm32_errors;
|
||||
uint32_t rfm32_irqs_processed;
|
||||
uint32_t rfm32_irqs_processedv2;
|
||||
volatile bool pending;
|
||||
|
||||
void PIOS_RFM22_EXT_Int(void)
|
||||
{
|
||||
bool valid = PIOS_RFM22B_validate(g_rfm22b_dev);
|
||||
@ -740,8 +739,6 @@ void PIOS_RFM22_EXT_Int(void)
|
||||
}
|
||||
portEND_SWITCHING_ISR(pxHigherPriorityTaskWoken);
|
||||
}
|
||||
|
||||
pending = true;
|
||||
}
|
||||
|
||||
void PIOS_RFM22_processPendingISR(uint32_t wait_ms)
|
||||
@ -753,12 +750,6 @@ void PIOS_RFM22_processPendingISR(uint32_t wait_ms)
|
||||
rfm32_irqs_processed++;
|
||||
rfm22_processInt();
|
||||
}
|
||||
|
||||
if (pending) {
|
||||
rfm32_irqs_processedv2++;
|
||||
rfm22_processInt();
|
||||
pending = false;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************
|
||||
|
Loading…
x
Reference in New Issue
Block a user