|
|
|
Bean
InternalI2C
|
Internal I2C Communication Interface
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.
-
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 bean (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 bean (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.
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.
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 it is also provided if the interrupt service is 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. 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. 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.
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.
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, HCS08, HCS12 and 56800 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.
For each generated event it is possible to set:
|
|
|
Processor ExpertTM and Embedded BeansTM are registered trademarks of UNIS, Ltd.
©1997-2005, UNIS, Ltd.
|
|
|