Skip to content

Commit d9f5f74

Browse files
committed
nrfs: Added explicit enum values
Added explicit enum values for better resistance to change Signed-off-by: Rafal Dyla <[email protected]>
1 parent 1e10485 commit d9f5f74

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

nrfs/include/internal/requests/nrfs_reqs_common.h

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,19 @@
5252
extern "C" {
5353
#endif
5454

55+
/* Warning! Do not change the order of this enumeration */
5556
enum {
56-
NRFS_SERVICE_ID_CLOCK,
57-
NRFS_SERVICE_ID_DIAG,
58-
NRFS_SERVICE_ID_DVFS,
59-
NRFS_SERVICE_ID_GDPWR,
60-
NRFS_SERVICE_ID_MRAM,
61-
NRFS_SERVICE_ID_PMIC,
62-
NRFS_SERVICE_ID_RESET,
63-
NRFS_SERVICE_ID_TEMP,
64-
NRFS_SERVICE_ID_USB,
65-
NRFS_SERVICE_ID_GDFS,
66-
NRFS_SERVICE_ID_SWEXT,
57+
NRFS_SERVICE_ID_CLOCK = 0,
58+
NRFS_SERVICE_ID_DIAG = 1,
59+
NRFS_SERVICE_ID_DVFS = 2,
60+
NRFS_SERVICE_ID_GDPWR = 3,
61+
NRFS_SERVICE_ID_MRAM = 4,
62+
NRFS_SERVICE_ID_PMIC = 5,
63+
NRFS_SERVICE_ID_RESET = 6,
64+
NRFS_SERVICE_ID_TEMP = 7,
65+
NRFS_SERVICE_ID_USB = 8,
66+
NRFS_SERVICE_ID_GDFS = 9,
67+
NRFS_SERVICE_ID_SWEXT = 10,
6768
};
6869

6970
#ifdef __cplusplus

nrfs/include/internal/services/nrfs_gdpwr.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ extern "C" {
1515

1616
/** @brief Power domain selection */
1717
typedef enum __NRFS_PACKED {
18-
GDPWR_GD_FAST_ACTIVE_0,
19-
GDPWR_GD_FAST_ACTIVE_1,
20-
GDPWR_GD_FAST_MAIN,
21-
GDPWR_GD_SLOW_ACTIVE,
22-
GDPWR_GD_SLOW_MAIN
18+
GDPWR_GD_FAST_ACTIVE_0 = 0,
19+
GDPWR_GD_FAST_ACTIVE_1 = 1,
20+
GDPWR_GD_FAST_MAIN = 2,
21+
GDPWR_GD_SLOW_ACTIVE = 3,
22+
GDPWR_GD_SLOW_MAIN = 4
2323
} gdpwr_power_domain_t;
2424

2525
typedef enum __NRFS_PACKED {

0 commit comments

Comments
 (0)