diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-07-12 22:16:16 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-07-17 15:02:43 -0400 |
commit | 118fd21cb815d1c27e7e5bd6b394369bdf095919 (patch) | |
tree | 78ceda354491dfb66419f0a7e892017a05319a73 /src/avr/irq.h | |
parent | 969485c754731183f357e6fef23c6180f59d4cb6 (diff) | |
download | kutter-118fd21cb815d1c27e7e5bd6b394369bdf095919.tar.gz kutter-118fd21cb815d1c27e7e5bd6b394369bdf095919.tar.xz kutter-118fd21cb815d1c27e7e5bd6b394369bdf095919.zip |
irq: Support sleeping when mcu is idle
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/avr/irq.h')
-rw-r--r-- | src/avr/irq.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/avr/irq.h b/src/avr/irq.h index 33172c0f..349c4c43 100644 --- a/src/avr/irq.h +++ b/src/avr/irq.h @@ -28,6 +28,10 @@ static inline void irq_restore(irqstatus_t flag) { SREG = flag; } +static inline void irq_wait(void) { + asm("sei\n sleep\n cli" : : : "memory"); +} + static inline void irq_poll(void) { } |