SynchroSlave
 
 
 Bean SynchroSlave
 
Slave for synchronous serial communication

Events are functions called when some important event occurred and its processing starts.

Events:

  • EventModule - Name of the user module (without extension), where the events from this bean are placed.
  • OnRxChar - This event is called after a correct character is received.
    DMA mode:
    If DMA controller is available on the selected CPU and the receiver is configured to use DMA controller then this event is disabled. Only OnFullRxBuf method can be used in DMA mode.

      ANSIC prototype: void OnRxChar(void)
    • Priority - OnRxChar priority Default value is based on the interrupt priority defined in property Interrupt input priority. For details see description below of the page.

  • OnTxChar - This event is called after a character is transmitted.
    DMA mode:
    If DMA controller is available on the selected CPU and the transmitter is configured to use DMA controller then this event is disabled. Only OnFreeTxBuf method can be used in DMA mode.

      ANSIC prototype: void OnTxChar(void)
    • Priority - OnTxChar priority Default value is based on the interrupt priority defined in property Interrupt input priority. For details see description below of the page.

  • OnFullRxBuf - This event is called when the input buffer is full.
    This event is available only if non-zero length of input buffer is defined.
    DMA mode:
    If DMA controller is available on the selected CPU and the receiver is configured to use DMA controller then this event is enabled and can be used to detect the end of DMA transfer.

      ANSIC prototype: void OnFullRxBuf(void)
    • Priority - OnFullRxBuf priority Default value is based on the interrupt priority defined in property Interrupt input priority. For details see description below of the page.

  • OnFreeTxBuf - This event is called after the last character in output buffer is transmitted.
    This event is available only if non-zero length of output buffer is defined.
    DMA mode:
    If DMA controller is available on the selected CPU and the transmitter is configured to use DMA controller then this event is enabled and can be used to detect the end of DMA transfer.

      ANSIC prototype: void OnFreeTxBuf(void)
    • Priority - OnFreeTxBuf priority Default value is based on the interrupt priority defined in property Interrupt input priority. For details see description below of the page.

  • Event specific for HC(S)08, HCS12, HCS12X and 56800 derivatives.
    • OnTxEmptyChar - The event is called when an Empty character is sent (see "Empty character" property for details about empty character).
      DMA mode:
      If DMA controller is available on the selected CPU and the transmitter is configured to use DMA controller then this event is not available.

        ANSIC prototype: void OnTxEmptyChar(void)
      • Priority - Priority of the event routine. Default value is based on the interrupt priority defined in property Interrupt input priority. For details see description below of the page.

  • OnError - This event is called when a channel error (not the error returned by a given method) occurs. The errors can be read using GetError method.

      ANSIC prototype: void OnError(void)
    • Priority - OnError priority Default value is based on the interrupt priority defined in property Interrupt input priority. For details see description below of the page.

  • OnRxCharExt - This event is called after a correct character is received. The parameter of the event contains the last received character. If an input buffer are used, the character is also inserted into the buffer.
    DMA mode:
    If DMA controller is available on the selected CPU and the receiver is configured to use DMA controller then this event is disabled. Only OnFullRxBuf method can be used in DMA mode.

      ANSIC prototype: void OnRxCharExt(%'ModuleName'_TComData Chr)
    • Chr:BeanName_TComData - The last received character
    • Priority - Priority of the event routine. Default value is based on the interrupt priority defined in property Interrupt input priority. For details see description below of the page.


For each generated event it is possible to set:



Processor ExpertTM and Embedded BeansTM are registered trademarks of UNIS, Ltd.
©1997-2005, UNIS, Ltd.