Anguel
It (a PE component) works exactly like a function. You call the component with the calling parameters that you want to use (assuming it has a parameter). Some components like the spi driver have multiple ISR entry points that get inserted into the vector table or handled by the driver and then your code is called at these entry points. It depends on the driver but PE accounts for the methods you enable in the configuration screen. Then stubs are then automatically inserted into your code or in an Events.c table (marked as ISR's) when you generate the project (automatically done if you are using PE). Then you simply put your code in the stub. PE also automatically creates the necessary include statements. Here is an example of some code for a CW6.3 project, for the 51jm128. This is an ISR for a freq in capture, the ISR is for the overflow bit.
You can use some or as many PE components as you want with MQX. I have not used MQX Lite as yet but I know that there is coming a File System component. Erich created one for freeRTOS on his web site.
Regards
Robert
/*
** ===================================================================
** Event : FreqTrig_OnCapture (module Events)
**
** From bean : FreqTrig [Capture]
** Description :
** This event is called on capturing of Timer/Counter actual
** value (only when the bean is enabled - <Enable> and the
** events are enabled - <EnableEvent>.This event is enabled
** only if a <interrupt service/event> is enabled.
** Parameters : None
** Returns : Nothing
FREQ_OUT_ENABLE_CNT_MAX u8_status = FreqCapture_Enable();
u8_status = FreqOut_Enable();
/*--------------------------------------------------------------------------------------------------
((((((((((((((((((((((((((((((((( TimerOverFlow )))))))))))))))))))))))))))))))))))))))))))))))))))
----------------------------------------------------------------------------------------------------
Function: Timer overflow tracking
Input: Interrupt on TOF flag, TFLG2
Return:
Notes: CaptureMode = 0xFF, flag off, 0x00 first edge, 0x01 second edge
--------------------------------------------------------------------------------------------------*/
void FreqCapture_OnOverflow(void)
{
if((u8_capture_mode == ge_FIRST_EDGE) ||
(u8_capture_mode == ge_SECOND_EDGE)){ // active-count TOF
gu8_OvrFlowCntr++;
}
return;
}