STM32F412 I2C slave that may be required to transmit or receive (non blocking with interrupt) without knowing it first?
On a STM32F412 I need to have an I2C slave that may be required to transmit or receive data without knowing it first.
The problem is that we have two separate functions:
- HAL_I2C_Slave_Receive_IT to receive data from the master, but the driver will hang if the master will try to read data
- HAL_I2C_Slave_Transmit_IT to send data to the master, but the driver will hang if the master will try to write data
Is there anything useful in HAL or any other library, or have i to hardly write low level code by myself to do it?
Any other suggestion?
Thanks in advance
*****
