OPEnSLab-OSU / Loom

Arduino library for Internet of Things Rapid Prototyping in environmental sensing
GNU General Public License v3.0
26 stars 3 forks source link

Documentation does not specify what functions are allowed in ISR #68

Open prototypicalpro opened 4 years ago

prototypicalpro commented 4 years ago

Describe the bug When writing an ISR using the Interrupt manager, it is not clear which functions are safe to use in an ISR (e.g. interrupt safe). While there is an Arduino documentation page for this (https://www.arduino.cc/reference/en/language/functions/external-interrupts/attachinterrupt/), the ability to create check flag interrupts means these standard rules are changed in certain conditions (volatile keyword?). To fix this, we should specify a list (or a general rule) of which operations are allowed to be used in an ISR for each type of ISR Loom allows.

prototypicalpro commented 4 years ago

Upon discussion, it was decided that Loom would discontinue support for SAMD immediate ISRs, and only provide an API for the check flag style. This decisions was made to minimize the amount of programming proficiency required to create an ISR, and due to the lack of instances in which a true immediate ISR is needed.