|
|
|
Component
AsynchroSerial
Asynchronous serial communication
Events:
(Events are call-back functions called when an important event occurrs.
Please see the Embedded Components page for more information.)
-
EventModule
- Name of the user module (without extension), where the events from this component are placed.
-
BeforeNewSpeed
- This event is called when the CPU speed mode is being changed (using CPU methods) - before the change. The event is enabled only if speed modes are supported in the target CPU component (more than one speed mode).
ANSIC prototype: void BeforeNewSpeed(void)
-
AfterNewSpeed
- This event is called when the CPU speed mode is being changed (using CPU methods) - after the change. The event is enabled only if speed modes are supported in the target CPU component (more than one speed mode).
ANSIC prototype: void AfterNewSpeed(void)
-
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.
The event is available only when the Interrupt service/event property is enabled.
ANSIC prototype: void OnError(void)
- Priority - OnError priority. Default value is based on the interrupt priority defined in property Interrupt Error priority. For details see description below of the page.
-
OnRxChar
- This event is called after a correct character is received.
The event is available only when the Interrupt service/event property is enabled and either the Receiver property is enabled or the SCI output mode property (if supported) is set to Single-wire mode.
ANSIC prototype: void OnRxChar(void)
- Priority - OnRxChar priority. Default value is based on the interrupt priority defined in property Interrupt RxD priority. For details see description below of the page.
-
OnRxCharExt
- This event is called after a correct character is received. The last received character is passed as a parameter of the event function.
Nevertheless, the last received character is placed in the external buffer of the component.
This event is identical in function with the OnRxChar event with a parameter added. It is not recommended to use both OnRxChar and OnRxCharExt events at the same time.
The event is available only when the Interrupt service/event property is enabled and either the Receiver property is enabled or the SCI output mode property (if supported) is set to Single-wire mode.
ANSIC prototype: void OnRxCharExt(%'ModuleName'_TComData Chr)
- Chr:ComponentName_TComData - The last character correctly received.
- Priority - OnRxCharExt priority. Default value is based on the interrupt priority defined in property Interrupt RxD priority. For details see description below of the page.
-
OnTxChar
- This event is called after a character is placed to the output buffer of the serial peripheral. This event can be used to determine when the component is ready to accept new data. If the specific peripheral uses a double-buffering scheme the last character can be still being transmitted when the OnTxChar event is invoked.
The event is available only when both Interrupt service/event and Transmitter properties are enabled.
ANSIC prototype: void OnTxChar(void)
- Priority - OnTxChar priority. Default value is based on the interrupt priority defined in property Interrupt TxD priority. For details see description below of the page.
-
OnFullRxBuf
- This event is called when the input buffer is full, i.e. after reception of the last character that was successfully placed into input buffer.
This event is available only when the Interrupt service/event property is enabled and either the Receiver property is enabled or the SCI output mode property (if supported) is set to Single-wire mode and the Input buffer size property is set to non-zero value.
ANSIC prototype: void OnFullRxBuf(void)
- Priority - OnFullRxBuf priority. Default value is based on the interrupt priority defined in property Interrupt RxD priority. For details see description below of the page.
-
OnFreeTxBuf
- This event is called after the last character in the output buffer is transmitted.
The event is available only when both Interrupt service/event and Transmitter properties are enabled and the value of Output buffer size property is non-zero.
ANSIC prototype: void OnFreeTxBuf(void)
- Priority - OnFreeTxBuf priority. Default value is based on the interrupt priority defined in property Interrupt TxD priority. For details see description below of the page.
-
OnBreak
- This event is called when a break occurs on the input channel.
The event is available only when both Interrupt service/event and Break signal properties are enabled.
ANSIC prototype: void OnBreak(void)
- Priority - OnBreak priority. Default value is based on the interrupt priority defined in property Interrupt Error priority. For details see description below of the page.
- Events for Freescale ColdFireV1, HC08, HCS08, HCS12 and HCS12X derivatives.
-
OnIdle
- This event is called when an idle condition on the receiver is detected.
The event is available only when both Interrupt service/event and Receiver properties are enabled.
ANSIC prototype: void OnIdle(void)
- Priority - OnIdle priority. Default value is based on the interrupt priority defined in property Interrupt RxD priority. For details see description below of the page.
- Events for Freescale ColdFireV1, HCS08, HC08, HCS12, HCS12X and 56800/E derivatives.
- Event is not supported for SLIC module on Freescale HC08 QL3/4 derivatives.
-
OnTxComplete
- This event indicates that the transmitter is finished transmitting all data, preamble, and break characters and is idle. It can be used to determine when it is safe to switch a line driver (e.g. in RS-485 applications).
The event is available only when both Interrupt service/event and Transmitter properties are enabled.
ANSIC prototype: void OnTxComplete(void)
- Priority - Priority of the event routine. Default value is based on the interrupt priority defined in property Interrupt TxD priority. For details see description below of the page.
- Events for Freescale ColdFireV1, RS08, HCS08 AC, DZ, DE, DN, DV, EL, EN, FL, IB, IC, JE, JM, JS, LG, LH, LL, MM, MP, QB, QE, SC, SE, SG, SH and SV, HCS12 HY, HA, P and HCS12X derivatives only.
-
OnRxActiveEdge
- This event is called when an active edge on the receiver input is detected.
The method EnableRxEdgeDetect is used to permit invocation of this event.
The method DisableRxEdgeDetect is used to forbid invocation of this event.
The event is available only when both Interrupt service/event and the Active edge detection properties are enabled.
ANSIC prototype: void OnRxActiveEdge(void)
- Priority - Priority of the event routine. Default value is based on the interrupt priority defined in property Interrupt RxD priority. For details see description below of the page.
For each generated event it is possible to set:
|