Skip to content

Commit 99f2ea1

Browse files
tom-vanerhankur
authored andcommitted
flash/nor/nrf5: use BIT() instead of << operator
for features flags. Change-Id: I8bff0f5fac41c50180c847f36c6d2a075eca32ca Signed-off-by: Tomas Vanek <[email protected]> Reviewed-on: https://review.openocd.org/c/openocd/+/8109 Reviewed-by: Antonio Borneo <[email protected]> Tested-by: jenkins
1 parent 4160a6a commit 99f2ea1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/flash/nor/nrf5.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <target/armv7m.h>
1818
#include <helper/types.h>
1919
#include <helper/time_support.h>
20+
#include <helper/bits.h>
2021

2122
/* Both those values are constant across the current spectrum ofr nRF5 devices */
2223
#define WATCHDOG_REFRESH_REGISTER 0x40010600
@@ -94,10 +95,10 @@ struct nrf52_ficr_info {
9495
};
9596

9697
enum nrf5_features {
97-
NRF5_FEATURE_SERIES_51 = 1 << 0,
98-
NRF5_FEATURE_SERIES_52 = 1 << 1,
99-
NRF5_FEATURE_BPROT = 1 << 2,
100-
NRF5_FEATURE_ACL_PROT = 1 << 3,
98+
NRF5_FEATURE_SERIES_51 = BIT(0),
99+
NRF5_FEATURE_SERIES_52 = BIT(1),
100+
NRF5_FEATURE_BPROT = BIT(2),
101+
NRF5_FEATURE_ACL_PROT = BIT(3),
101102
};
102103

103104
struct nrf5_device_spec {

0 commit comments

Comments
 (0)