Syntax:
HI2CStartOccurred
Command Availability:
Only available for microcontrollers with the hardware I2C or TWI module.
Explanation:
Check if a start condition has occurred since the last run of this function.
Only used in slave mode.
Note:
This command is also available on microcontrollers with a second hardware I2C port.
HI2C2StartOccurred
Example:
'Slave-mode polling loop that waits for the master to begin a transmission
Do
If HI2CStartOccurred Then ' <<< the HI2CStartOccurred instruction
HI2CReceive DataByte
End If
LoopKey line: If HI2CStartOccurred Then — checks whether the master has issued a start condition on the hardware I2C module since this function was last called,
so the slave only attempts to receive data once a transmission has actually begun.
Supported in <HI2C.H>
See Also:
- HI2C Overview — category overview
- HI2CStart — related command in the same category
- HI2CStop — related command in the same category

