mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-21 02:43:46 +08:00
e01ac7f80f
date: 2026-08-19T09:43:43
master commit: ba29a38507
17 lines
351 B
C
17 lines
351 B
C
#include "board/sys/sys.h"
|
|
|
|
// ********************* Critical section helpers *********************
|
|
uint8_t global_critical_depth = 0U;
|
|
|
|
static volatile bool interrupts_enabled = false;
|
|
|
|
void enable_interrupts(void) {
|
|
interrupts_enabled = true;
|
|
__enable_irq();
|
|
}
|
|
|
|
void disable_interrupts(void) {
|
|
interrupts_enabled = false;
|
|
__disable_irq();
|
|
}
|