Skip to content

Commit 4422bce

Browse files
bigdinotechcalvinatintel
authored andcommitted
AGM-157 Add support for _BV() macro
Add support for _BV() macro
1 parent 0c1ba8b commit 4422bce

File tree

1 file changed

+2
-0
lines changed
  • system/libarc32_arduino101/common/misc

1 file changed

+2
-0
lines changed

system/libarc32_arduino101/common/misc/util.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ static inline int _IsPowerOfTwo(unsigned int x)
9595
#define KHZ(x) ((x) * 1000)
9696
#define MHZ(x) (KHZ(x) * 1000)
9797

98+
#define _BV(bit) (1U << (bit))
99+
98100
#ifdef __cplusplus
99101
}
100102
#endif

0 commit comments

Comments
 (0)