diff options
Diffstat (limited to 'examples/imx7d_val_m4/demo_apps/ecspi_flash_demo/ecspi_xfer.c')
-rw-r--r-- | examples/imx7d_val_m4/demo_apps/ecspi_flash_demo/ecspi_xfer.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/imx7d_val_m4/demo_apps/ecspi_flash_demo/ecspi_xfer.c b/examples/imx7d_val_m4/demo_apps/ecspi_flash_demo/ecspi_xfer.c index f7f4bb9..6a3a7d8 100644 --- a/examples/imx7d_val_m4/demo_apps/ecspi_flash_demo/ecspi_xfer.c +++ b/examples/imx7d_val_m4/demo_apps/ecspi_flash_demo/ecspi_xfer.c @@ -54,7 +54,7 @@ static ecspi_state_t ecspiState; * Comments: ECSPI module initialize * ******************************************************************************/ -void ECSPI_XFER_Config(ecspi_init_t* initConfig) +void ECSPI_XFER_Config(const ecspi_init_config_t* initConfig) { /* Initialize ECSPI state structure content. */ ecspiState.txBuffPtr = 0; @@ -215,11 +215,11 @@ void BOARD_ECSPI_HANDLER(void) ECSPI_ClearStatusFlag(BOARD_ECSPI_BASEADDR, ecspiFlagTxfifoTc); ECSPI_ClearStatusFlag(BOARD_ECSPI_BASEADDR, ecspiFlagRxfifoOverflow); + /* Unlock the task to process the event. */ xSemaphoreGiveFromISR(ecspiState.xSemaphore, &xHigherPriorityTaskWoken); - if(xHigherPriorityTaskWoken == pdTRUE) - { - portEND_SWITCHING_ISR(xHigherPriorityTaskWoken); - } + + /* Perform a context switch to wake the higher priority task. */ + portYIELD_FROM_ISR(xHigherPriorityTaskWoken); } /******************************************************************************* |