Using PESL and peripheral initialization components

For every Peripheral Initialization Component (for details, see Component categories topic) there is a C macro defined by Processor Expert with the name component name _DEVICE. This macro results to the name of the peripheral selected in the component named 'component name'. Using this macro instead of a real peripheral name allows a peripheral to be changed later by changing the component property without modifying the PESL commands in user code.

Example:

Let's expect we have a component Init_SCI named SCI1:

  PESL(SCI1_DEVICE, SCI_SET_BAUDRATE, 1);
  

Processor Expert shows the list of the available PESL commands as a subtree of the Peripheral Initialization component in the Components view (see Processor Expert options topic for details). User can drag and drop the commands into the code from this tree. The PESL commands created this way use the component name _DEVICE macro instead of a specific peripheral name.