|
|
|
Component
InternalI2C
Internal I2C Communication Interface
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)
-
OnReceiveData
- This event is invoked when I2C finishes the reception of the data successfully. This event is not available for the SLAVE mode and if both RecvChar and RecvBlock are disabled. This event is enabled only if interrupts/events are enabled.
ANSIC prototype: void OnReceiveData(void)
- Priority - OnReceiveData priority. Default value is based on the interrupt priority defined in property Interrupt priority. For details see description below of the page.
-
OnTransmitData
- This event is invoked when I2C finishes the transmission of the data successfully. This event is not available for the SLAVE mode and if both SendChar and SendBlock are disabled. This event is enabled only if interrupts/events are enabled.
ANSIC prototype: void OnTransmitData(void)
- Priority - OnTransmitData priority. Default value is based on the interrupt priority defined in property Interrupt priority. For details see description below of the page.
-
OnByteTransfer
- This event is called when one-byte transfer (including the acknowledge bit) is successfully finished (slave address or one data byte is transmitted or received). This event is not available for the SLAVE mode and if all RecvChar, RecvBlock, SendChar and SendBlock are disabled.
Note: It is possible to use the event for slowing down communication, when slower slave needs some time for data processing.
ANSIC prototype: void OnByteTransfer(void)
- Priority - OnByteTransfer priority. Default value is based on the interrupt priority defined in property Interrupt priority. For details see description below of the page.
-
OnReadReq
- This event is invoked when its own specific address is matched with the calling address and the value of the R/W command bit of the calling address equal to 1, ie., the Master requests reading from slave (the slave will be sending). After the return from the event call the first data byte sending will start. This event is not available for the MASTER mode.
ANSIC prototype: void OnReadReq(void)
- Priority - Priority of the event routine. Default value is based on the interrupt priority defined in property Interrupt priority. For details see description below of the page.
-
OnWriteReq
- This event is invoked when its own specific address is matched with the calling address and the value of the R/W command bit of the calling address is set to 0, ie., the Master requests writing to the slave (the slave will be receiving). After the return from the event call the first data byte receiving starts. This event is not available for the MASTER mode.
ANSIC prototype: void OnWriteReq(void)
- Priority - Priority of the event routine. Default value is based on the interrupt priority defined in property Interrupt priority. For details see description below of the page.
-
OnRxChar
- Called when a correct character is received. This event is not available for the MASTER mode.
ANSIC prototype: void OnRxChar(void)
- Priority - OnRxChar priority. Default value is based on the interrupt priority defined in property Interrupt priority. For details see description below of the page.
-
OnTxChar
- Called when a correct character is sent (placed to the transmitter). This event is not available for the MASTER mode.
ANSIC prototype: void OnTxChar(void)
- Priority - OnTxChar priority. Default value is based on the interrupt priority defined in property Interrupt priority. For details see description below of the page.
-
OnFreeTxBuf
- The event is called when the last byte from the output buffer is sent. This event is not available for the MASTER mode.
If OnTxChar event is also generated, this event is called after OnTxChar.
ANSIC prototype: void OnFreeTxBuf(void)
- Priority - OnFreeTxBuf priority. Default value is based on the interrupt priority defined in property Interrupt priority. For details see description below of the page.
-
OnFullRxBuf
- 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 not available for the MASTER mode.
If OnRxChar event also generated, this event is called after OnRxChar.
ANSIC prototype: void OnFullRxBuf(void)
- Priority - OnFullRxBuf priority. Default value is based on the interrupt priority defined in property Interrupt priority. For details see description below of the page.
-
OnArbitLost
- This event is called when the master lost the bus arbitration or the device detects an error on the bus. This event is enabled only if interrupts/events are enabled.
ANSIC prototype: void OnArbitLost(void)
- Priority - OnArbitLost priority. Default value is based on the interrupt priority defined in property Interrupt priority. For details see description below of the page.
-
OnNACK
- Called when a no slave acknowledge (NAK) occurs during communication. This event is not available for the SLAVE mode. This event is enabled only if interrupts/events are enabled.
ANSIC prototype: void OnNACK(void)
- Priority - Priority of the event routine. Default value is based on the interrupt priority defined in property Interrupt priority. For details see description below of the page.
-
OnError
- This event is called when input data buffer has overrun. This event is not available for the MASTER mode.
ANSIC prototype: void OnError(void)
- Priority - Priority of the event routine. Default value is based on the interrupt priority defined in property Interrupt priority. For details see description below of the page.
- Events for HC08 SR12 AP64 derivatives.
-
OnCRCerror
- This event is called when a CRC error is detected. This event is provided only if CRC generation/decoding property enabled. This event is enabled only if interrupts/events are enabled.
ANSIC prototype: void OnCRCerror(void)
- Priority - Priority of the event routine. Default value is based on the interrupt priority defined in property Interrupt priority. For details see description below of the page.
- Events for HC(S)08, RS08, ColdFireV1, HCS12(X) and 56800/E derivatives.
-
OnTxEmptyChar
- The event is called when an Empty character is sent (see "Empty character" property for details about empty character). This event is not available for the MASTER mode.
ANSIC prototype: void OnTxEmptyChar(void)
- Priority - Priority of the event routine. Default value is based on the interrupt priority defined in property Interrupt priority. For details see description below of the page.
- Events for 56800, HCS08, ColdFireV1, HCS12X, S12P and RS08 derivatives.
-
OnGeneralCall
- This event is called when a general call address is received and it is acknowledged. This event is not available for the MASTER mode and if the General call address property is disabled.
ANSIC prototype: void OnGeneralCall(void)
- Priority - OnStop priority. Default value is based on the interrupt priority defined in property Interrupt priority. For details see description below of the page.
For each generated event it is possible to set:
|