mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-17 10:42:07 +08:00
ac6b182524
version: sunnypilot v2026.002.000 (dev)
date: 2026-07-16T04:41:37
master commit: 70f2c3ac79
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();
|
|
}
|