Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions EMF2014/IMUTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,15 @@ static signed char gyro_orientation[9] = { 1, 0, 0, // X axis mappin
// Callbacks
static void IMU_interrupt(void) {
if (xTaskGetSchedulerState() == taskSCHEDULER_RUNNING) {
static BaseType_t xHigherPriorityTaskWoken = pdFALSE;
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
BaseType_t xResult;

// set the int state bit to wake the IMU Task
xEventGroupSetBitsFromISR(imuTask.eventGroup,
IMU_INT_BIT,
&xHigherPriorityTaskWoken);
xResult = xEventGroupSetBitsFromISR(imuTask.eventGroup,
IMU_INT_BIT,
&xHigherPriorityTaskWoken);

if (xHigherPriorityTaskWoken) {
if (xResult == pdPASS) {
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
}
}
Expand Down
11 changes: 6 additions & 5 deletions EMF2014/PMICTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,15 @@
static void PMICChargeStateInterrupt(void)
{
if (xTaskGetSchedulerState() == taskSCHEDULER_RUNNING) {
static BaseType_t xHigherPriorityTaskWoken = pdFALSE;
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
BaseType_t xResult;

// set the Charge state bit to wake the PMIC Task
xEventGroupSetBitsFromISR(PMIC.eventGroup,
PMIC_CHAREG_STATE_BIT,
&xHigherPriorityTaskWoken);
xResult = xEventGroupSetBitsFromISR(PMIC.eventGroup,
PMIC_CHAREG_STATE_BIT,
&xHigherPriorityTaskWoken);

if (xHigherPriorityTaskWoken) {
if (xResult == pdPASS) {
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
}
}
Expand Down