Hello All,
I would like to ask for a little clarification with regards to interrupts.
Say I have two methods, readValueA() and readValueB(), which execute I2C based routines.
Each of these methods contains an i2c.write() (the command) followed by an i2c.read() (the response).
Lets say readValueB() is triggered by an interrupt during the execution of the code in readValueA() and execution of readValueA() is in between the i2c.write() and i2c.read(). Under normal circumstances this gets interrupted if I understand correctly?
Along comes readValueB() which starts with an i2c.write() in essence killing what readValueA() was doing, is this correct thinking here ?
If this is the case am I to assume that these types of operations should be surrounded with an disbale_irq() / enable_irq() ?
Kind thanks,
Serge
Hello All,
I would like to ask for a little clarification with regards to interrupts.
Say I have two methods, readValueA() and readValueB(), which execute I2C based routines.
Each of these methods contains an i2c.write() (the command) followed by an i2c.read() (the response).
Lets say readValueB() is triggered by an interrupt during the execution of the code in readValueA() and execution of readValueA() is in between the i2c.write() and i2c.read(). Under normal circumstances this gets interrupted if I understand correctly?
Along comes readValueB() which starts with an i2c.write() in essence killing what readValueA() was doing, is this correct thinking here ?
If this is the case am I to assume that these types of operations should be surrounded with an disbale_irq() / enable_irq() ?
Kind thanks, Serge