lib/sw_services/xilplmi/src/xplmi_gic_interrupts.c
int XPlmi_GicRegisterHandler(u32 GicPVal, u32 GicPxVal, GicIntHandler_t Handler,
	void *Data)
{
	int Status = XST_FAILURE;
	XPlmi_TaskNode *Task = NULL;
	u32 PlmIntrId = (GicPVal << 8U) | (GicPxVal << 16U);

	Task = XPlmi_TaskCreate(XPLM_TASK_PRIORITY_0, Handler, Data);
	if (Task == NULL) {
		Status = XPlmi_UpdateStatus(XPLM_ERR_TASK_CREATE, 0);
		XPlmi_Printf(DEBUG_GENERAL, "GIC Interrupt task creation "
			"error\n\r");
		goto END;
	}
	Task->IntrId = PlmIntrId | XPLMI_IOMODULE_PMC_GIC_IRQ;
	Task->State |= (u8)XPLMI_TASK_IS_PERSISTENT;
	Status = XST_SUCCESS;

END:
	return Status;
}
/*****************************************************************************/
/**
 * @brief	This will register the GIC handler.
 *
 * @param	GicPVal indicates GICP source
 * @param	GicPxVal indicates GICPx source
 * @param	Handler is the interrupt handler
 * @param	Data is the pointer to arguments to interrupt handler
 *
 * @return	None
 *
 *****************************************************************************/
@brief       This will register the GIC handler.
@param       GicPVal indicates GICP source
@param       GicPxVal indicates GICPx source
@param       Handler is the interrupt handler
@param       Data is the pointer to arguments to interrupt handler

@return      None
@brief This will register the GIC handler . @param GicPVal indicates GICP source @param GicPxVal indicates GICPx source @param Handler is the interrupt handler @param Data is the pointer to arguments to interrupt handler @return None
int XPlmi_GicRegisterHandler(u32 GicPVal, u32 GicPxVal, GicIntHandler_t Handler,
	void *Data)
{
	int Status = XST_FAILURE;
	XPlmi_TaskNode *Task = NULL;
	u32 PlmIntrId = (GicPVal << 8U) | (GicPxVal << 16U);
	Task = XPlmi_TaskCreate(XPLM_TASK_PRIORITY_0, Handler, Data);
	if (Task == NULL) {
		Status = XPlmi_UpdateStatus(XPLM_ERR_TASK_CREATE, 0);
		XPlmi_Printf(DEBUG_GENERAL, "GIC Interrupt task creation "
			"error\n\r");
		goto END;
	}
	Task->IntrId = PlmIntrId | XPLMI_IOMODULE_PMC_GIC_IRQ;
	Task->State |= (u8)XPLMI_TASK_IS_PERSISTENT;
	Status = XST_SUCCESS;
END:
	return Status;
}
int XPlmi_GicRegisterHandler ( u32 GicPVal , u32 GicPxVal , GicIntHandler_t Handler , void * Data ) { int Status = XST_FAILURE ; XPlmi_TaskNode * Task = NULL ; u32 PlmIntrId = ( GicPVal << 8U ) | ( GicPxVal << 16U ) ; Task = XPlmi_TaskCreate ( XPLM_TASK_PRIORITY_0 , Handler , Data ) ; if ( Task == NULL ) { Status = XPlmi_UpdateStatus ( XPLM_ERR_TASK_CREATE , 0 ) ; XPlmi_Printf ( DEBUG_GENERAL , " " " \n \r " ) ; goto END ; } Task -> IntrId = PlmIntrId | XPLMI_IOMODULE_PMC_GIC_IRQ ; Task -> State |= ( u8 ) XPLMI_TASK_IS_PERSISTENT ; Status = XST_SUCCESS ; END : return Status ; }
@brief       This will register the GIC handler.
@brief This will register the GIC handler .