ISR Declaration and Closure Tab

ISR declaration being a function declaration receives pairs of values for its declaration: a void pointer of the HAL data structure and the actual variable name. The values selected for both are:

The Close ISR statement(s) section allows you to enter C statements that will be inserted at the end of ISRs of all LDDs included in the Processor Expert project. This is useful for RTOSs that require ISRs to return a specific value to make decisions based on it, that is Linux. In case of MQX, you only enter a return;.

There are many RTOSs that do not support Virtual Interrupt Tables, so ISRs do not receive any input parameter. In such case, you can leave the Close ISR statement(s) section with its default values (no parameters). However, since ISRs in LDDs use the HAL data structure to perform its I/O, declare a pointer to that structure into each LDD driver.

Include the following in the RTOS include section below the RTOS C include:

  %if ModuleName != 'Cpu' 
  
  %'ModuleName'_TDeviceData *DeviceDataPrv;
  
  %endif

  

Set the pointer generated by Processor Expert in that LDD with the pointer returned by the Init() function somewhere in the RTOS adaptation layer.

Note: If an RTOS does not use Virtual Interrupt Tables, it might not use input parameters for its ISRs, therefore, no need to enter anything in the ISR declaration section.