I'm playing around with a basic program/library that manages the NRF24L01+ and so far it's gone well (I have a working TX and RX app that run well under debug).
Something has come up though that really raises a design question which is what general technique do people use for deferring work?
So in an interrupt handler there are "urgent" things to do (and various things one cannot do) but there are also application work to do that can/should be done outside the interrupt handler (to minimize the time that other interrupts are masked).
In an OS (like Windows) interrupt handlers can queue what's called a DPC and the system will execute the code pointed to by the DPC after the interrupt has exited.
But without an OS how do people usually stricture this? I can see a simple volatile flag could work but that's a bit limited especially if there might be different work to and different interrupts etc.
Something has come up though that really raises a design question which is what general technique do people use for deferring work?
So in an interrupt handler there are "urgent" things to do (and various things one cannot do) but there are also application work to do that can/should be done outside the interrupt handler (to minimize the time that other interrupts are masked).
In an OS (like Windows) interrupt handlers can queue what's called a DPC and the system will execute the code pointed to by the DPC after the interrupt has exited.
But without an OS how do people usually stricture this? I can see a simple volatile flag could work but that's a bit limited especially if there might be different work to and different interrupts etc.











