28 #ifndef ASCENSION_UTILS_H |
28 #ifndef ASCENSION_UTILS_H |
29 #define ASCENSION_UTILS_H |
29 #define ASCENSION_UTILS_H |
30 |
30 |
31 #include <stdbool.h> |
31 #include <stdbool.h> |
32 |
32 |
33 #ifdef __cplusplus |
|
34 extern "C" { |
|
35 #endif |
|
36 |
|
37 |
|
38 static inline bool asc_test_flag(unsigned int reg, int flag) { |
33 static inline bool asc_test_flag(unsigned int reg, int flag) { |
39 return (reg & flag) == flag; |
34 return (reg & flag) == flag; |
40 } |
35 } |
41 |
36 |
42 static inline void asc_set_flag(unsigned int *reg, int flag) { |
37 static inline void asc_set_flag(unsigned int *reg, int flag) { |