Skip to content

Commit

Permalink
Add vPortRemoveInterruptHandler API (FreeRTOS#533)
Browse files Browse the repository at this point in the history
* Add xPortRemoveInterruptHandler API

This API is added to the MicroBlazeV9 port. It enables the application
writer to remove an interrupt handler.

This was originally contributed in this PR - FreeRTOS#523

* Change API signature to return void

This makes the API similar to vPortDisableInterrupt.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

Co-authored-by: Gavin Lambert <uecasm@users.noreply.github.com>
  • Loading branch information
aggarg and uecasm authored Aug 3, 2022
1 parent 2070d9d commit dc9c034
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions portable/GCC/MicroBlazeV9/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ int32_t lReturn;
portEXIT_CRITICAL();
}

configASSERT( lReturn );
configASSERT( lReturn == pdPASS );
}
/*-----------------------------------------------------------*/

Expand All @@ -345,7 +345,7 @@ int32_t lReturn;
XIntc_Disable( &xInterruptControllerInstance, ucInterruptID );
}

configASSERT( lReturn );
configASSERT( lReturn == pdPASS );
}
/*-----------------------------------------------------------*/

Expand Down Expand Up @@ -374,6 +374,24 @@ int32_t lReturn;
}
/*-----------------------------------------------------------*/

void vPortRemoveInterruptHandler( uint8_t ucInterruptID )
{
int32_t lReturn;

/* An API function is provided to remove an interrupt handler because the
interrupt controller instance variable is private to this file. */

lReturn = prvEnsureInterruptControllerIsInitialised();

if( lReturn == pdPASS )
{
XIntc_Disconnect( &xInterruptControllerInstance, ucInterruptID );
}

configASSERT( lReturn == pdPASS );
}
/*-----------------------------------------------------------*/

static int32_t prvEnsureInterruptControllerIsInitialised( void )
{
static int32_t lInterruptControllerInitialised = pdFALSE;
Expand Down

0 comments on commit dc9c034

Please sign in to comment.