Tool/software: TI-RTOS
I am researching the example C:\ti\pdk_am437x_1_0_10\packages\ti\drv\pruss\test\src\main_test_pruss2_pru0.c, I want to know how to use the function PRUICSS_registerIrqHandler(),and find its define in the pruicss_int.c:
/**
* @brief This function Registers an Interrupt Handler for an event.\n
*
* @param pruEvtoutNum The ARM side event number.\n
*
* @param handle Pruss's driver handle
*
* @param intrNum Interrupt number of MPU/C66x
*
* @param eventNum Event number of PRUICSS
*
* @param waitEnable Flag specifying whether application can wait on this interrupt
* using PRUICSSPruWaitEvent function
*
* @param irqHandler Pointer to a function which will be called on interrupt.\n
*
* \return 0 in case of successful registration, -1 otherwise. \n
*/
int32_t PRUICSS_registerIrqHandler(PRUICSS_Handle handle,
uint32_t pruEvtoutNum,
int32_t intrNum,
int32_t eventNum,
uint8_t waitEnable,
PRUICSSDRV_IRQ_HANDLER irqHandler
)
if I want register the interrupt server function to int number(PRU_ICSS1_EVTOUT0) which corresponds to Host-2 of the PRU-ICSS interrupt controller.
So, the parameter intrNum will be 52, eventNum will be a PRU interrupt event number, such as 16(pr0_pru_mst_intr0_intr_req).
but I do not know what the parameter pruEvtoutNum is?I track the code: PRUICSS_registerIrqHandler()->PRUICSS_osalRegisterInterrupt()->HwiP_create()->Hwi_construct(), but I can not find where define the function Hwi_construct()?
and how to use the waitEnable?
CPU : AM437x, CCS7.4, pdk_am437x_1_0_10