AP_HAL: added irq save/restore API to hal.scheduler

these are used by RPM driver
This commit is contained in:
Andrew Tridgell 2018-03-28 19:49:51 +11:00
parent 54185af8ef
commit d2075b4b67
1 changed files with 14 additions and 0 deletions

View File

@ -58,4 +58,18 @@ public:
virtual void create_uavcan_thread() {};
/*
disable interrupts and return a context that can be used to
restore the interrupt state. This can be used to protect
critical regions
Warning: may not be implemented on all HALs
*/
virtual void *disable_interrupts_save(void) { return nullptr; }
/*
restore interrupt state from disable_interrupts_save()
*/
virtual void restore_interrupts(void *) {}
};