stm32f3xx-hal icon indicating copy to clipboard operation
stm32f3xx-hal copied to clipboard

I2C with interrupts

Open clebi opened this issue 4 years ago • 0 comments

It is a first attempt to implement I2C communications using interrupts. I know that this is not ready for merge but I wanted to have a feedback on my work on I2C and see if I am going into the right direction. Thruthfully, I am not an experienced embedded developer. As of now, I don't think there is someting in embedded-hal define to support i2c communication with interrupts.

The interrupt function is responsible for computing the state of the I2C device on every interruption. For the moment, calling this function is the responsability of the consumer.

You can find an example of use here: example. The example is using cortex-m-rtic. In this example the interrupt function is called for I2C1_EV_EXTI23 and I2C1_ER.

clebi avatar Jan 26 '21 20:01 clebi