14 lines
228 B
C
14 lines
228 B
C
#pragma once
|
|
|
|
#include "aum1_cm1.h"
|
|
|
|
struct InterruptLock {
|
|
uint32_t old_primask;
|
|
|
|
InterruptLock() : old_primask(__get_PRIMASK()) { __disable_irq(); }
|
|
|
|
~InterruptLock() {
|
|
__set_PRIMASK(old_primask);
|
|
}
|
|
};
|