AP_HAL: added irq save/restore API to hal.scheduler
these are used by RPM driver
This commit is contained in:
parent
54185af8ef
commit
d2075b4b67
@ -58,4 +58,18 @@ public:
|
|||||||
|
|
||||||
virtual void create_uavcan_thread() {};
|
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 *) {}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user