stm8: add halt assembly

This commit is contained in:
King Kévin 2022-09-26 18:01:16 +02:00
parent c724a5b477
commit cc63108403
1 changed files with 3 additions and 1 deletions

View File

@ -3456,9 +3456,11 @@ typedef struct {
/* some useful assembly instructions */
// wait for event (go to sleep)
#define wfe() { __asm__("wfi\n"); }
#define wfe() { __asm__("wfe\n"); }
// wait for interrupt (go to sleep)
#define wfi() { __asm__("wfi\n"); }
// go into halt mode
#define halt() { __asm__("halt\n"); }
// disable interrupts
#define sim() { __asm__("sim"); }
// enable interrupts