diff options
Diffstat (limited to 'firmware/export/system.h')
-rw-r--r-- | firmware/export/system.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/firmware/export/system.h b/firmware/export/system.h index fe8121ce20..ee668c87e4 100644 --- a/firmware/export/system.h +++ b/firmware/export/system.h | |||
@@ -214,6 +214,11 @@ static inline __attribute__((always_inline)) | |||
214 | uint32_t isolate_first_bit(uint32_t val) | 214 | uint32_t isolate_first_bit(uint32_t val) |
215 | { return val & -val; } | 215 | { return val & -val; } |
216 | 216 | ||
217 | /* Functions to set and clear register or variable bits atomically */ | ||
218 | void bitmod32(volatile uint32_t *addr, uint32_t bits, uint32_t mask); | ||
219 | void bitset32(volatile uint32_t *addr, uint32_t mask); | ||
220 | void bitclr32(volatile uint32_t *addr, uint32_t mask); | ||
221 | |||
217 | /* gcc 3.4 changed the format of the constraints */ | 222 | /* gcc 3.4 changed the format of the constraints */ |
218 | #if (__GNUC__ >= 3) && (__GNUC_MINOR__ > 3) || (__GNUC__ >= 4) | 223 | #if (__GNUC__ >= 3) && (__GNUC_MINOR__ > 3) || (__GNUC__ >= 4) |
219 | #define I_CONSTRAINT "I08" | 224 | #define I_CONSTRAINT "I08" |