Closed ghost closed 6 years ago
The atomic block restores the state. The noInterrupts() and interrupts() do not. It is not the same.
Using the SoftwareWire in a situation where the interrupts should be off all the time is rare, but not unlikely, since the SoftwareWire might be chosen over the Wire library just because interrupts can stay off.
Will the Arduino Primo with nRF52 processor support the ATOMIC_BLOCK macro in the future ?
I think the ATOMIC_BLOCK
block is AVR-specific.
@Thomasrutgers: is there an NRF equivalent macro that can be used. Better would be a generic libc equivalent but I'm not aware of one.
Ok, I see. Will look into this.
@Thomasrutgers Does v1.1.0 compile for you?
@stevemarple Yes, compiles! Haven't tested all of it, but the listdevices example is working.
I needed to do this to have it work on my Arduino Primo.