-
Notifications
You must be signed in to change notification settings - Fork 0
/
nRF51_SDK_8.1.0_b6ed55f.patch
1248 lines (1198 loc) · 78.2 KB
/
nRF51_SDK_8.1.0_b6ed55f.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/libraries/bootloader_dfu/dfu_ble_svc.h b/nRF51_SDK_8.1.0_b6ed55f/components/libraries/bootloader_dfu/dfu_ble_svc.h
index 3c51483..cb5d57b 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/libraries/bootloader_dfu/dfu_ble_svc.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/libraries/bootloader_dfu/dfu_ble_svc.h
@@ -44,11 +44,9 @@
#define SYSTEM_SERVICE_ATT_SIZE 8 /**< Size of the system service attribute length including CRC-16 at the end. */
/**@brief The SVC numbers used by the SVC functions in the SoC library. */
-enum BOOTLOADER_SVCS
-{
- DFU_BLE_SVC_PEER_DATA_SET = BOOTLOADER_SVC_BASE, /**< SVC number for the setting of peer data call. */
- BOOTLOADER_SVC_LAST
-};
+typedef unsigned char BOOTLOADER_SVCS; // enum
+#define DFU_BLE_SVC_PEER_DATA_SET (BOOTLOADER_SVC_BASE + 0) /**< SVC number for the setting of peer data call. */
+#define BOOTLOADER_SVC_LAST (BOOTLOADER_SVC_BASE + 1)
/**@brief DFU Peer data structure.
*
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/ble.h b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/ble.h
index fcef380..e6019b0 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/ble.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/ble.h
@@ -61,19 +61,17 @@
/**
* @brief Common API SVC numbers.
*/
-enum BLE_COMMON_SVCS
-{
- SD_BLE_ENABLE = BLE_SVC_BASE, /**< Enable and initialize the BLE stack */
- SD_BLE_EVT_GET, /**< Get an event from the pending events queue. */
- SD_BLE_TX_BUFFER_COUNT_GET, /**< Get the total number of available application transmission buffers from the BLE stack. */
- SD_BLE_UUID_VS_ADD, /**< Add a Vendor Specific UUID. */
- SD_BLE_UUID_DECODE, /**< Decode UUID bytes. */
- SD_BLE_UUID_ENCODE, /**< Encode UUID bytes. */
- SD_BLE_VERSION_GET, /**< Get the local version information (company id, Link Layer Version, Link Layer Subversion). */
- SD_BLE_USER_MEM_REPLY, /**< User Memory Reply. */
- SD_BLE_OPT_SET, /**< Set a BLE option. */
- SD_BLE_OPT_GET, /**< Get a BLE option. */
-};
+typedef unsigned char BLE_COMMON_SVCS; // enum
+#define SD_BLE_ENABLE (BLE_SVC_BASE + 0) /**< Enable and initialize the BLE stack */
+#define SD_BLE_EVT_GET (BLE_SVC_BASE + 1) /**< Get an event from the pending events queue. */
+#define SD_BLE_TX_BUFFER_COUNT_GET (BLE_SVC_BASE + 2) /**< Get the total number of available application transmission buffers from the BLE stack. */
+#define SD_BLE_UUID_VS_ADD (BLE_SVC_BASE + 3) /**< Add a Vendor Specific UUID. */
+#define SD_BLE_UUID_DECODE (BLE_SVC_BASE + 4) /**< Decode UUID bytes. */
+#define SD_BLE_UUID_ENCODE (BLE_SVC_BASE + 5) /**< Encode UUID bytes. */
+#define SD_BLE_VERSION_GET (BLE_SVC_BASE + 6) /**< Get the local version information (company id, Link Layer Version, Link Layer Subversion). */
+#define SD_BLE_USER_MEM_REPLY (BLE_SVC_BASE + 7) /**< User Memory Reply. */
+#define SD_BLE_OPT_SET (BLE_SVC_BASE + 8) /**< Set a BLE option. */
+#define SD_BLE_OPT_GET (BLE_SVC_BASE + 9) /**< Get a BLE option. */
/**
* @brief BLE Module Independent Event IDs.
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/ble_gap.h b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/ble_gap.h
index 5b50131..96e9676 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/ble_gap.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/ble_gap.h
@@ -52,36 +52,34 @@
/**@brief GAP API SVC numbers.
*/
-enum BLE_GAP_SVCS
-{
- SD_BLE_GAP_ADDRESS_SET = BLE_GAP_SVC_BASE, /**< Set own Bluetooth Address. */
- SD_BLE_GAP_ADDRESS_GET, /**< Get own Bluetooth Address. */
- SD_BLE_GAP_ADV_DATA_SET, /**< Set Advertising Data. */
- SD_BLE_GAP_ADV_START, /**< Start Advertising. */
- SD_BLE_GAP_ADV_STOP, /**< Stop Advertising. */
- SD_BLE_GAP_CONN_PARAM_UPDATE, /**< Connection Parameter Update. */
- SD_BLE_GAP_DISCONNECT, /**< Disconnect. */
- SD_BLE_GAP_TX_POWER_SET, /**< Set TX Power. */
- SD_BLE_GAP_APPEARANCE_SET, /**< Set Appearance. */
- SD_BLE_GAP_APPEARANCE_GET, /**< Get Appearance. */
- SD_BLE_GAP_PPCP_SET, /**< Set PPCP. */
- SD_BLE_GAP_PPCP_GET, /**< Get PPCP. */
- SD_BLE_GAP_DEVICE_NAME_SET, /**< Set Device Name. */
- SD_BLE_GAP_DEVICE_NAME_GET, /**< Get Device Name. */
- SD_BLE_GAP_AUTHENTICATE, /**< Initiate Pairing/Bonding. */
- SD_BLE_GAP_SEC_PARAMS_REPLY, /**< Reply with Security Parameters. */
- SD_BLE_GAP_AUTH_KEY_REPLY, /**< Reply with an authentication key. */
- SD_BLE_GAP_ENCRYPT, /**< Initiate encryption procedure. */
- SD_BLE_GAP_SEC_INFO_REPLY, /**< Reply with Security Information. */
- SD_BLE_GAP_CONN_SEC_GET, /**< Obtain connection security level. */
- SD_BLE_GAP_RSSI_START, /**< Start reporting of changes in RSSI. */
- SD_BLE_GAP_RSSI_STOP, /**< Stop reporting of changes in RSSI. */
- SD_BLE_GAP_SCAN_START, /**< Start Scanning. */
- SD_BLE_GAP_SCAN_STOP, /**< Stop Scanning. */
- SD_BLE_GAP_CONNECT, /**< Connect. */
- SD_BLE_GAP_CONNECT_CANCEL, /**< Cancel ongoing connection procedure. */
- SD_BLE_GAP_RSSI_GET, /**< Get the last RSSI sample. */
-};
+typedef unsigned char BLE_GAP_SVCS; // enum
+#define SD_BLE_GAP_ADDRESS_SET (BLE_GAP_SVC_BASE + 0) /**< Set own Bluetooth Address. */
+#define SD_BLE_GAP_ADDRESS_GET (BLE_GAP_SVC_BASE + 1) /**< Get own Bluetooth Address. */
+#define SD_BLE_GAP_ADV_DATA_SET (BLE_GAP_SVC_BASE + 2) /**< Set Advertising Data. */
+#define SD_BLE_GAP_ADV_START (BLE_GAP_SVC_BASE + 3) /**< Start Advertising. */
+#define SD_BLE_GAP_ADV_STOP (BLE_GAP_SVC_BASE + 4) /**< Stop Advertising. */
+#define SD_BLE_GAP_CONN_PARAM_UPDATE (BLE_GAP_SVC_BASE + 5) /**< Connection Parameter Update. */
+#define SD_BLE_GAP_DISCONNECT (BLE_GAP_SVC_BASE + 6) /**< Disconnect. */
+#define SD_BLE_GAP_TX_POWER_SET (BLE_GAP_SVC_BASE + 7) /**< Set TX Power. */
+#define SD_BLE_GAP_APPEARANCE_SET (BLE_GAP_SVC_BASE + 8) /**< Set Appearance. */
+#define SD_BLE_GAP_APPEARANCE_GET (BLE_GAP_SVC_BASE + 9) /**< Get Appearance. */
+#define SD_BLE_GAP_PPCP_SET (BLE_GAP_SVC_BASE + 10) /**< Set PPCP. */
+#define SD_BLE_GAP_PPCP_GET (BLE_GAP_SVC_BASE + 11) /**< Get PPCP. */
+#define SD_BLE_GAP_DEVICE_NAME_SET (BLE_GAP_SVC_BASE + 12) /**< Set Device Name. */
+#define SD_BLE_GAP_DEVICE_NAME_GET (BLE_GAP_SVC_BASE + 13) /**< Get Device Name. */
+#define SD_BLE_GAP_AUTHENTICATE (BLE_GAP_SVC_BASE + 14) /**< Initiate Pairing/Bonding. */
+#define SD_BLE_GAP_SEC_PARAMS_REPLY (BLE_GAP_SVC_BASE + 15) /**< Reply with Security Parameters. */
+#define SD_BLE_GAP_AUTH_KEY_REPLY (BLE_GAP_SVC_BASE + 16) /**< Reply with an authentication key. */
+#define SD_BLE_GAP_ENCRYPT (BLE_GAP_SVC_BASE + 17) /**< Initiate encryption procedure. */
+#define SD_BLE_GAP_SEC_INFO_REPLY (BLE_GAP_SVC_BASE + 18) /**< Reply with Security Information. */
+#define SD_BLE_GAP_CONN_SEC_GET (BLE_GAP_SVC_BASE + 19) /**< Obtain connection security level. */
+#define SD_BLE_GAP_RSSI_START (BLE_GAP_SVC_BASE + 20) /**< Start reporting of changes in RSSI. */
+#define SD_BLE_GAP_RSSI_STOP (BLE_GAP_SVC_BASE + 21) /**< Stop reporting of changes in RSSI. */
+#define SD_BLE_GAP_SCAN_START (BLE_GAP_SVC_BASE + 22) /**< Start Scanning. */
+#define SD_BLE_GAP_SCAN_STOP (BLE_GAP_SVC_BASE + 23) /**< Stop Scanning. */
+#define SD_BLE_GAP_CONNECT (BLE_GAP_SVC_BASE + 24) /**< Connect. */
+#define SD_BLE_GAP_CONNECT_CANCEL (BLE_GAP_SVC_BASE + 25) /**< Cancel ongoing connection procedure. */
+#define SD_BLE_GAP_RSSI_GET (BLE_GAP_SVC_BASE + 26) /**< Get the last RSSI sample. */
/**@brief GAP Event IDs.
* IDs that uniquely identify an event coming from the stack to the application.
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/ble_gattc.h b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/ble_gattc.h
index 6df99df..c3c6889 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/ble_gattc.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/ble_gattc.h
@@ -52,18 +52,16 @@
* @{ */
/**@brief GATTC API SVC numbers. */
-enum BLE_GATTC_SVCS
-{
- SD_BLE_GATTC_PRIMARY_SERVICES_DISCOVER = BLE_GATTC_SVC_BASE, /**< Primary Service Discovery. */
- SD_BLE_GATTC_RELATIONSHIPS_DISCOVER, /**< Relationship Discovery. */
- SD_BLE_GATTC_CHARACTERISTICS_DISCOVER, /**< Characteristic Discovery. */
- SD_BLE_GATTC_DESCRIPTORS_DISCOVER, /**< Characteristic Descriptor Discovery. */
- SD_BLE_GATTC_CHAR_VALUE_BY_UUID_READ, /**< Read Characteristic Value by UUID. */
- SD_BLE_GATTC_READ, /**< Generic read. */
- SD_BLE_GATTC_CHAR_VALUES_READ, /**< Read multiple Characteristic Values. */
- SD_BLE_GATTC_WRITE, /**< Generic write. */
- SD_BLE_GATTC_HV_CONFIRM /**< Handle Value Confirmation. */
-};
+typedef unsigned char BLE_GATTC_SVCS; // enum
+#define SD_BLE_GATTC_PRIMARY_SERVICES_DISCOVER (BLE_GATTC_SVC_BASE + 0) /**< Primary Service Discovery. */
+#define SD_BLE_GATTC_RELATIONSHIPS_DISCOVER (BLE_GATTC_SVC_BASE + 1) /**< Relationship Discovery. */
+#define SD_BLE_GATTC_CHARACTERISTICS_DISCOVER (BLE_GATTC_SVC_BASE + 2) /**< Characteristic Discovery. */
+#define SD_BLE_GATTC_DESCRIPTORS_DISCOVER (BLE_GATTC_SVC_BASE + 3) /**< Characteristic Descriptor Discovery. */
+#define SD_BLE_GATTC_CHAR_VALUE_BY_UUID_READ (BLE_GATTC_SVC_BASE + 4) /**< Read Characteristic Value by UUID. */
+#define SD_BLE_GATTC_READ (BLE_GATTC_SVC_BASE + 5) /**< Generic read. */
+#define SD_BLE_GATTC_CHAR_VALUES_READ (BLE_GATTC_SVC_BASE + 6) /**< Read multiple Characteristic Values. */
+#define SD_BLE_GATTC_WRITE (BLE_GATTC_SVC_BASE + 7) /**< Generic write. */
+#define SD_BLE_GATTC_HV_CONFIRM (BLE_GATTC_SVC_BASE + 8) /**< Handle Value Confirmation. */
/**
* @brief GATT Client Event IDs.
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/ble_gatts.h b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/ble_gatts.h
index ad33db9..a195c8a 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/ble_gatts.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/ble_gatts.h
@@ -56,20 +56,18 @@
/**
* @brief GATTS API SVC numbers.
*/
-enum BLE_GATTS_SVCS
-{
- SD_BLE_GATTS_SERVICE_ADD = BLE_GATTS_SVC_BASE, /**< Add a service. */
- SD_BLE_GATTS_INCLUDE_ADD, /**< Add an included service. */
- SD_BLE_GATTS_CHARACTERISTIC_ADD, /**< Add a characteristic. */
- SD_BLE_GATTS_DESCRIPTOR_ADD, /**< Add a generic attribute. */
- SD_BLE_GATTS_VALUE_SET, /**< Set an attribute value. */
- SD_BLE_GATTS_VALUE_GET, /**< Get an attribute value. */
- SD_BLE_GATTS_HVX, /**< Handle Value Notification or Indication. */
- SD_BLE_GATTS_SERVICE_CHANGED, /**< Perform a Service Changed Indication to one or more peers. */
- SD_BLE_GATTS_RW_AUTHORIZE_REPLY, /**< Reply to an authorization request for a read or write operation on one or more attributes. */
- SD_BLE_GATTS_SYS_ATTR_SET, /**< Set the persistent system attributes for a connection. */
- SD_BLE_GATTS_SYS_ATTR_GET, /**< Retrieve the persistent system attributes. */
-};
+typedef unsigned char BLE_GATTS_SVCS; // enum
+#define SD_BLE_GATTS_SERVICE_ADD (BLE_GATTS_SVC_BASE + 0) /**< Add a service. */
+#define SD_BLE_GATTS_INCLUDE_ADD (BLE_GATTS_SVC_BASE + 1) /**< Add an included service. */
+#define SD_BLE_GATTS_CHARACTERISTIC_ADD (BLE_GATTS_SVC_BASE + 2) /**< Add a characteristic. */
+#define SD_BLE_GATTS_DESCRIPTOR_ADD (BLE_GATTS_SVC_BASE + 3) /**< Add a generic attribute. */
+#define SD_BLE_GATTS_VALUE_SET (BLE_GATTS_SVC_BASE + 4) /**< Set an attribute value. */
+#define SD_BLE_GATTS_VALUE_GET (BLE_GATTS_SVC_BASE + 5) /**< Get an attribute value. */
+#define SD_BLE_GATTS_HVX (BLE_GATTS_SVC_BASE + 6) /**< Handle Value Notification or Indication. */
+#define SD_BLE_GATTS_SERVICE_CHANGED (BLE_GATTS_SVC_BASE + 7) /**< Perform a Service Changed Indication to one or more peers. */
+#define SD_BLE_GATTS_RW_AUTHORIZE_REPLY (BLE_GATTS_SVC_BASE + 8) /**< Reply to an authorization request for a read or write operation on one or more attributes. */
+#define SD_BLE_GATTS_SYS_ATTR_SET (BLE_GATTS_SVC_BASE + 9) /**< Set the persistent system attributes for a connection. */
+#define SD_BLE_GATTS_SYS_ATTR_GET (BLE_GATTS_SVC_BASE + 10) /**< Retrieve the persistent system attributes. */
/**
* @brief GATT Server Event IDs.
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/ble_l2cap.h b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/ble_l2cap.h
index 5728a49..8c8d1bb 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/ble_l2cap.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/ble_l2cap.h
@@ -52,12 +52,10 @@
* @{ */
/**@brief L2CAP API SVC numbers. */
-enum BLE_L2CAP_SVCS
-{
- SD_BLE_L2CAP_CID_REGISTER = BLE_L2CAP_SVC_BASE, /**< Register a CID. */
- SD_BLE_L2CAP_CID_UNREGISTER, /**< Unregister a CID. */
- SD_BLE_L2CAP_TX /**< Transmit a packet. */
-};
+typedef unsigned char BLE_L2CAP_SVCS; // enum
+#define SD_BLE_L2CAP_CID_REGISTER (BLE_L2CAP_SVC_BASE + 0) /**< Register a CID. */
+#define SD_BLE_L2CAP_CID_UNREGISTER (BLE_L2CAP_SVC_BASE + 1) /**< Unregister a CID. */
+#define SD_BLE_L2CAP_TX (BLE_L2CAP_SVC_BASE + 2) /**< Transmit a packet. */
/**@brief L2CAP Event IDs. */
enum BLE_L2CAP_EVTS
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/nrf_mbr.h b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/nrf_mbr.h
index e40d066..d54c6d4 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/nrf_mbr.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/nrf_mbr.h
@@ -61,10 +61,8 @@
* @{ */
/**@brief nRF Master Boot Record API SVC numbers. */
-enum NRF_MBR_SVCS
-{
- SD_MBR_COMMAND = MBR_SVC_BASE, /**< ::sd_mbr_command */
-};
+typedef unsigned char NRF_MBR_SVCS; // enum
+#define SD_MBR_COMMAND (MBR_SVC_BASE + 0) /**< ::sd_mbr_command */
/**@brief Possible values for ::sd_mbr_command_t.command */
enum NRF_MBR_COMMANDS
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/nrf_sdm.h b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/nrf_sdm.h
index 15b4c79..9a894f2 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/nrf_sdm.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/nrf_sdm.h
@@ -88,14 +88,12 @@ This is the offset where the first byte of the softdevice hex file is written.*/
* @{ */
/**@brief nRF SoftDevice Manager API SVC numbers. */
-enum NRF_SD_SVCS
-{
- SD_SOFTDEVICE_ENABLE = SDM_SVC_BASE, /**< ::sd_softdevice_enable */
- SD_SOFTDEVICE_DISABLE, /**< ::sd_softdevice_disable */
- SD_SOFTDEVICE_IS_ENABLED, /**< ::sd_softdevice_is_enabled */
- SD_SOFTDEVICE_VECTOR_TABLE_BASE_SET, /**< ::sd_softdevice_vector_table_base_set */
- SVC_SDM_LAST /**< Placeholder for last SDM SVC */
-};
+typedef unsigned char NRF_SD_SVCS; // enum
+#define SD_SOFTDEVICE_ENABLE (SDM_SVC_BASE + 0) /**< ::sd_softdevice_enable */
+#define SD_SOFTDEVICE_DISABLE (SDM_SVC_BASE + 1) /**< ::sd_softdevice_disable */
+#define SD_SOFTDEVICE_IS_ENABLED (SDM_SVC_BASE + 2) /**< ::sd_softdevice_is_enabled */
+#define SD_SOFTDEVICE_VECTOR_TABLE_BASE_SET (SDM_SVC_BASE + 3) /**< ::sd_softdevice_vector_table_base_set */
+#define SVC_SDM_LAST (SDM_SVC_BASE + 4) /**< Placeholder for last SDM SVC */
/**@brief Possible lfclk oscillator sources. */
enum NRF_CLOCK_LFCLKSRCS
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/nrf_soc.h b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/nrf_soc.h
index a9c0b79..aee19c5 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/nrf_soc.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s110/headers/nrf_soc.h
@@ -88,61 +88,59 @@
* @{ */
/**@brief The SVC numbers used by the SVC functions in the SoC library. */
-enum NRF_SOC_SVCS
-{
- SD_PPI_CHANNEL_ENABLE_GET = SOC_SVC_BASE,
- SD_PPI_CHANNEL_ENABLE_SET,
- SD_PPI_CHANNEL_ENABLE_CLR,
- SD_PPI_CHANNEL_ASSIGN,
- SD_PPI_GROUP_TASK_ENABLE,
- SD_PPI_GROUP_TASK_DISABLE,
- SD_PPI_GROUP_ASSIGN,
- SD_PPI_GROUP_GET,
- SD_FLASH_PAGE_ERASE,
- SD_FLASH_WRITE,
- SD_FLASH_PROTECT,
- SD_MUTEX_NEW = SOC_SVC_BASE_NOT_AVAILABLE,
- SD_MUTEX_ACQUIRE,
- SD_MUTEX_RELEASE,
- SD_NVIC_ENABLEIRQ,
- SD_NVIC_DISABLEIRQ,
- SD_NVIC_GETPENDINGIRQ,
- SD_NVIC_SETPENDINGIRQ,
- SD_NVIC_CLEARPENDINGIRQ,
- SD_NVIC_SETPRIORITY,
- SD_NVIC_GETPRIORITY,
- SD_NVIC_SYSTEMRESET,
- SD_NVIC_CRITICAL_REGION_ENTER,
- SD_NVIC_CRITICAL_REGION_EXIT,
- SD_RAND_APPLICATION_POOL_CAPACITY,
- SD_RAND_APPLICATION_BYTES_AVAILABLE,
- SD_RAND_APPLICATION_GET_VECTOR,
- SD_POWER_MODE_SET,
- SD_POWER_SYSTEM_OFF,
- SD_POWER_RESET_REASON_GET,
- SD_POWER_RESET_REASON_CLR,
- SD_POWER_POF_ENABLE,
- SD_POWER_POF_THRESHOLD_SET,
- SD_POWER_RAMON_SET,
- SD_POWER_RAMON_CLR,
- SD_POWER_RAMON_GET,
- SD_POWER_GPREGRET_SET,
- SD_POWER_GPREGRET_CLR,
- SD_POWER_GPREGRET_GET,
- SD_POWER_DCDC_MODE_SET,
- SD_APP_EVT_WAIT,
- SD_CLOCK_HFCLK_REQUEST,
- SD_CLOCK_HFCLK_RELEASE,
- SD_CLOCK_HFCLK_IS_RUNNING,
- SD_RADIO_NOTIFICATION_CFG_SET,
- SD_ECB_BLOCK_ENCRYPT,
- SD_RADIO_SESSION_OPEN,
- SD_RADIO_SESSION_CLOSE,
- SD_RADIO_REQUEST,
- SD_EVT_GET,
- SD_TEMP_GET,
- SVC_SOC_LAST
-};
+typedef unsigned char NRF_SOC_SVCS; // enum
+#define SD_PPI_CHANNEL_ENABLE_GET (SOC_SVC_BASE + 0)
+#define SD_PPI_CHANNEL_ENABLE_SET (SOC_SVC_BASE + 1)
+#define SD_PPI_CHANNEL_ENABLE_CLR (SOC_SVC_BASE + 2)
+#define SD_PPI_CHANNEL_ASSIGN (SOC_SVC_BASE + 3)
+#define SD_PPI_GROUP_TASK_ENABLE (SOC_SVC_BASE + 4)
+#define SD_PPI_GROUP_TASK_DISABLE (SOC_SVC_BASE + 5)
+#define SD_PPI_GROUP_ASSIGN (SOC_SVC_BASE + 6)
+#define SD_PPI_GROUP_GET (SOC_SVC_BASE + 7)
+#define SD_FLASH_PAGE_ERASE (SOC_SVC_BASE + 8)
+#define SD_FLASH_WRITE (SOC_SVC_BASE + 9)
+#define SD_FLASH_PROTECT (SOC_SVC_BASE + 10)
+#define SD_MUTEX_NEW (SOC_SVC_BASE_NOT_AVAILABLE + 0)
+#define SD_MUTEX_ACQUIRE (SOC_SVC_BASE_NOT_AVAILABLE + 1)
+#define SD_MUTEX_RELEASE (SOC_SVC_BASE_NOT_AVAILABLE + 2)
+#define SD_NVIC_ENABLEIRQ (SOC_SVC_BASE_NOT_AVAILABLE + 3)
+#define SD_NVIC_DISABLEIRQ (SOC_SVC_BASE_NOT_AVAILABLE + 4)
+#define SD_NVIC_GETPENDINGIRQ (SOC_SVC_BASE_NOT_AVAILABLE + 5)
+#define SD_NVIC_SETPENDINGIRQ (SOC_SVC_BASE_NOT_AVAILABLE + 6)
+#define SD_NVIC_CLEARPENDINGIRQ (SOC_SVC_BASE_NOT_AVAILABLE + 7)
+#define SD_NVIC_SETPRIORITY (SOC_SVC_BASE_NOT_AVAILABLE + 8)
+#define SD_NVIC_GETPRIORITY (SOC_SVC_BASE_NOT_AVAILABLE + 9)
+#define SD_NVIC_SYSTEMRESET (SOC_SVC_BASE_NOT_AVAILABLE + 10)
+#define SD_NVIC_CRITICAL_REGION_ENTER (SOC_SVC_BASE_NOT_AVAILABLE + 11)
+#define SD_NVIC_CRITICAL_REGION_EXIT (SOC_SVC_BASE_NOT_AVAILABLE + 12)
+#define SD_RAND_APPLICATION_POOL_CAPACITY (SOC_SVC_BASE_NOT_AVAILABLE + 13)
+#define SD_RAND_APPLICATION_BYTES_AVAILABLE (SOC_SVC_BASE_NOT_AVAILABLE + 14)
+#define SD_RAND_APPLICATION_GET_VECTOR (SOC_SVC_BASE_NOT_AVAILABLE + 15)
+#define SD_POWER_MODE_SET (SOC_SVC_BASE_NOT_AVAILABLE + 16)
+#define SD_POWER_SYSTEM_OFF (SOC_SVC_BASE_NOT_AVAILABLE + 17)
+#define SD_POWER_RESET_REASON_GET (SOC_SVC_BASE_NOT_AVAILABLE + 18)
+#define SD_POWER_RESET_REASON_CLR (SOC_SVC_BASE_NOT_AVAILABLE + 19)
+#define SD_POWER_POF_ENABLE (SOC_SVC_BASE_NOT_AVAILABLE + 20)
+#define SD_POWER_POF_THRESHOLD_SET (SOC_SVC_BASE_NOT_AVAILABLE + 21)
+#define SD_POWER_RAMON_SET (SOC_SVC_BASE_NOT_AVAILABLE + 22)
+#define SD_POWER_RAMON_CLR (SOC_SVC_BASE_NOT_AVAILABLE + 23)
+#define SD_POWER_RAMON_GET (SOC_SVC_BASE_NOT_AVAILABLE + 24)
+#define SD_POWER_GPREGRET_SET (SOC_SVC_BASE_NOT_AVAILABLE + 25)
+#define SD_POWER_GPREGRET_CLR (SOC_SVC_BASE_NOT_AVAILABLE + 26)
+#define SD_POWER_GPREGRET_GET (SOC_SVC_BASE_NOT_AVAILABLE + 27)
+#define SD_POWER_DCDC_MODE_SET (SOC_SVC_BASE_NOT_AVAILABLE + 28)
+#define SD_APP_EVT_WAIT (SOC_SVC_BASE_NOT_AVAILABLE + 29)
+#define SD_CLOCK_HFCLK_REQUEST (SOC_SVC_BASE_NOT_AVAILABLE + 30)
+#define SD_CLOCK_HFCLK_RELEASE (SOC_SVC_BASE_NOT_AVAILABLE + 31)
+#define SD_CLOCK_HFCLK_IS_RUNNING (SOC_SVC_BASE_NOT_AVAILABLE + 32)
+#define SD_RADIO_NOTIFICATION_CFG_SET (SOC_SVC_BASE_NOT_AVAILABLE + 33)
+#define SD_ECB_BLOCK_ENCRYPT (SOC_SVC_BASE_NOT_AVAILABLE + 34)
+#define SD_RADIO_SESSION_OPEN (SOC_SVC_BASE_NOT_AVAILABLE + 35)
+#define SD_RADIO_SESSION_CLOSE (SOC_SVC_BASE_NOT_AVAILABLE + 36)
+#define SD_RADIO_REQUEST (SOC_SVC_BASE_NOT_AVAILABLE + 37)
+#define SD_EVT_GET (SOC_SVC_BASE_NOT_AVAILABLE + 38)
+#define SD_TEMP_GET (SOC_SVC_BASE_NOT_AVAILABLE + 39)
+#define SVC_SOC_LAST (SOC_SVC_BASE_NOT_AVAILABLE + 40)
/**@brief Possible values of a ::nrf_mutex_t. */
enum NRF_MUTEX_VALUES
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/ble.h b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/ble.h
index 96c79a8..b08950c 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/ble.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/ble.h
@@ -61,19 +61,17 @@
/**
* @brief Common API SVC numbers.
*/
-enum BLE_COMMON_SVCS
-{
- SD_BLE_ENABLE = BLE_SVC_BASE, /**< Enable and initialize the BLE stack */
- SD_BLE_EVT_GET, /**< Get an event from the pending events queue. */
- SD_BLE_TX_BUFFER_COUNT_GET, /**< Get the total number of available application transmission buffers from the stack. */
- SD_BLE_UUID_VS_ADD, /**< Add a Vendor Specific UUID. */
- SD_BLE_UUID_DECODE, /**< Decode UUID bytes. */
- SD_BLE_UUID_ENCODE, /**< Encode UUID bytes. */
- SD_BLE_VERSION_GET, /**< Get the local version information (company id, Link Layer Version, Link Layer Subversion). */
- SD_BLE_USER_MEM_REPLY, /**< User Memory Reply. */
- SD_BLE_OPT_SET, /**< Set a BLE option. */
- SD_BLE_OPT_GET, /**< Get a BLE option. */
-};
+typedef unsigned char BLE_COMMON_SVCS; // enum
+#define SD_BLE_ENABLE (BLE_SVC_BASE + 0) /**< Enable and initialize the BLE stack */
+#define SD_BLE_EVT_GET (BLE_SVC_BASE + 1) /**< Get an event from the pending events queue. */
+#define SD_BLE_TX_BUFFER_COUNT_GET (BLE_SVC_BASE + 2) /**< Get the total number of available application transmission buffers from the stack. */
+#define SD_BLE_UUID_VS_ADD (BLE_SVC_BASE + 3) /**< Add a Vendor Specific UUID. */
+#define SD_BLE_UUID_DECODE (BLE_SVC_BASE + 4) /**< Decode UUID bytes. */
+#define SD_BLE_UUID_ENCODE (BLE_SVC_BASE + 5) /**< Encode UUID bytes. */
+#define SD_BLE_VERSION_GET (BLE_SVC_BASE + 6) /**< Get the local version information (company id, Link Layer Version, Link Layer Subversion). */
+#define SD_BLE_USER_MEM_REPLY (BLE_SVC_BASE + 7) /**< User Memory Reply. */
+#define SD_BLE_OPT_SET (BLE_SVC_BASE + 8) /**< Set a BLE option. */
+#define SD_BLE_OPT_GET (BLE_SVC_BASE + 9) /**< Get a BLE option. */
/**
* @brief BLE Module Independent Event IDs.
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/ble_gap.h b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/ble_gap.h
index 57c0a13..3f90f8b 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/ble_gap.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/ble_gap.h
@@ -52,36 +52,34 @@
/**@brief GAP API SVC numbers.
*/
-enum BLE_GAP_SVCS
-{
- SD_BLE_GAP_ADDRESS_SET = BLE_GAP_SVC_BASE, /**< Set own Bluetooth Address. */
- SD_BLE_GAP_ADDRESS_GET, /**< Get own Bluetooth Address. */
- SD_BLE_GAP_ADV_DATA_SET, /**< Set Advertising Data. */
- SD_BLE_GAP_ADV_START, /**< Start Advertising. */
- SD_BLE_GAP_ADV_STOP, /**< Stop Advertising. */
- SD_BLE_GAP_CONN_PARAM_UPDATE, /**< Connection Parameter Update. */
- SD_BLE_GAP_DISCONNECT, /**< Disconnect. */
- SD_BLE_GAP_TX_POWER_SET, /**< Set TX Power. */
- SD_BLE_GAP_APPEARANCE_SET, /**< Set Appearance. */
- SD_BLE_GAP_APPEARANCE_GET, /**< Get Appearance. */
- SD_BLE_GAP_PPCP_SET, /**< Set PPCP. */
- SD_BLE_GAP_PPCP_GET, /**< Get PPCP. */
- SD_BLE_GAP_DEVICE_NAME_SET, /**< Set Device Name. */
- SD_BLE_GAP_DEVICE_NAME_GET, /**< Get Device Name. */
- SD_BLE_GAP_AUTHENTICATE, /**< Initiate Pairing/Bonding. */
- SD_BLE_GAP_SEC_PARAMS_REPLY, /**< Reply with Security Parameters. */
- SD_BLE_GAP_AUTH_KEY_REPLY, /**< Reply with an authentication key. */
- SD_BLE_GAP_ENCRYPT, /**< Initiate encryption procedure. */
- SD_BLE_GAP_SEC_INFO_REPLY, /**< Reply with Security Information. */
- SD_BLE_GAP_CONN_SEC_GET, /**< Obtain connection security level. */
- SD_BLE_GAP_RSSI_START, /**< Start reporting of changes in RSSI. */
- SD_BLE_GAP_RSSI_STOP, /**< Stop reporting of changes in RSSI. */
- SD_BLE_GAP_SCAN_START, /**< Start Scanning. */
- SD_BLE_GAP_SCAN_STOP, /**< Stop Scanning. */
- SD_BLE_GAP_CONNECT, /**< Connect. */
- SD_BLE_GAP_CONNECT_CANCEL, /**< Cancel ongoing connection procedure. */
- SD_BLE_GAP_RSSI_GET, /**< Get the last RSSI sample. */
-};
+typedef unsigned char BLE_GAP_SVCS; // enum
+#define SD_BLE_GAP_ADDRESS_SET (BLE_GAP_SVC_BASE + 0) /**< Set own Bluetooth Address. */
+#define SD_BLE_GAP_ADDRESS_GET (BLE_GAP_SVC_BASE + 1) /**< Get own Bluetooth Address. */
+#define SD_BLE_GAP_ADV_DATA_SET (BLE_GAP_SVC_BASE + 2) /**< Set Advertising Data. */
+#define SD_BLE_GAP_ADV_START (BLE_GAP_SVC_BASE + 3) /**< Start Advertising. */
+#define SD_BLE_GAP_ADV_STOP (BLE_GAP_SVC_BASE + 4) /**< Stop Advertising. */
+#define SD_BLE_GAP_CONN_PARAM_UPDATE (BLE_GAP_SVC_BASE + 5) /**< Connection Parameter Update. */
+#define SD_BLE_GAP_DISCONNECT (BLE_GAP_SVC_BASE + 6) /**< Disconnect. */
+#define SD_BLE_GAP_TX_POWER_SET (BLE_GAP_SVC_BASE + 7) /**< Set TX Power. */
+#define SD_BLE_GAP_APPEARANCE_SET (BLE_GAP_SVC_BASE + 8) /**< Set Appearance. */
+#define SD_BLE_GAP_APPEARANCE_GET (BLE_GAP_SVC_BASE + 9) /**< Get Appearance. */
+#define SD_BLE_GAP_PPCP_SET (BLE_GAP_SVC_BASE + 10) /**< Set PPCP. */
+#define SD_BLE_GAP_PPCP_GET (BLE_GAP_SVC_BASE + 11) /**< Get PPCP. */
+#define SD_BLE_GAP_DEVICE_NAME_SET (BLE_GAP_SVC_BASE + 12) /**< Set Device Name. */
+#define SD_BLE_GAP_DEVICE_NAME_GET (BLE_GAP_SVC_BASE + 13) /**< Get Device Name. */
+#define SD_BLE_GAP_AUTHENTICATE (BLE_GAP_SVC_BASE + 14) /**< Initiate Pairing/Bonding. */
+#define SD_BLE_GAP_SEC_PARAMS_REPLY (BLE_GAP_SVC_BASE + 15) /**< Reply with Security Parameters. */
+#define SD_BLE_GAP_AUTH_KEY_REPLY (BLE_GAP_SVC_BASE + 16) /**< Reply with an authentication key. */
+#define SD_BLE_GAP_ENCRYPT (BLE_GAP_SVC_BASE + 17) /**< Initiate encryption procedure. */
+#define SD_BLE_GAP_SEC_INFO_REPLY (BLE_GAP_SVC_BASE + 18) /**< Reply with Security Information. */
+#define SD_BLE_GAP_CONN_SEC_GET (BLE_GAP_SVC_BASE + 19) /**< Obtain connection security level. */
+#define SD_BLE_GAP_RSSI_START (BLE_GAP_SVC_BASE + 20) /**< Start reporting of changes in RSSI. */
+#define SD_BLE_GAP_RSSI_STOP (BLE_GAP_SVC_BASE + 21) /**< Stop reporting of changes in RSSI. */
+#define SD_BLE_GAP_SCAN_START (BLE_GAP_SVC_BASE + 22) /**< Start Scanning. */
+#define SD_BLE_GAP_SCAN_STOP (BLE_GAP_SVC_BASE + 23) /**< Stop Scanning. */
+#define SD_BLE_GAP_CONNECT (BLE_GAP_SVC_BASE + 24) /**< Connect. */
+#define SD_BLE_GAP_CONNECT_CANCEL (BLE_GAP_SVC_BASE + 25) /**< Cancel ongoing connection procedure. */
+#define SD_BLE_GAP_RSSI_GET (BLE_GAP_SVC_BASE + 26) /**< Get the last RSSI sample. */
/**@brief GAP Event IDs.
* IDs that uniquely identify an event coming from the stack to the application.
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/ble_gattc.h b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/ble_gattc.h
index efcc56c..463f74f 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/ble_gattc.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/ble_gattc.h
@@ -52,18 +52,16 @@
* @{ */
/**@brief GATTC API SVC numbers. */
-enum BLE_GATTC_SVCS
-{
- SD_BLE_GATTC_PRIMARY_SERVICES_DISCOVER = BLE_GATTC_SVC_BASE, /**< Primary Service Discovery. */
- SD_BLE_GATTC_RELATIONSHIPS_DISCOVER, /**< Relationship Discovery. */
- SD_BLE_GATTC_CHARACTERISTICS_DISCOVER, /**< Characteristic Discovery. */
- SD_BLE_GATTC_DESCRIPTORS_DISCOVER, /**< Characteristic Descriptor Discovery. */
- SD_BLE_GATTC_CHAR_VALUE_BY_UUID_READ, /**< Read Characteristic Value by UUID. */
- SD_BLE_GATTC_READ, /**< Generic read. */
- SD_BLE_GATTC_CHAR_VALUES_READ, /**< Read multiple Characteristic Values. */
- SD_BLE_GATTC_WRITE, /**< Generic write. */
- SD_BLE_GATTC_HV_CONFIRM /**< Handle Value Confirmation. */
-};
+typedef unsigned char BLE_GATTC_SVCS; // enum
+#define SD_BLE_GATTC_PRIMARY_SERVICES_DISCOVER (BLE_GATTC_SVC_BASE + 0) /**< Primary Service Discovery. */
+#define SD_BLE_GATTC_RELATIONSHIPS_DISCOVER (BLE_GATTC_SVC_BASE + 1) /**< Relationship Discovery. */
+#define SD_BLE_GATTC_CHARACTERISTICS_DISCOVER (BLE_GATTC_SVC_BASE + 2) /**< Characteristic Discovery. */
+#define SD_BLE_GATTC_DESCRIPTORS_DISCOVER (BLE_GATTC_SVC_BASE + 3) /**< Characteristic Descriptor Discovery. */
+#define SD_BLE_GATTC_CHAR_VALUE_BY_UUID_READ (BLE_GATTC_SVC_BASE + 4) /**< Read Characteristic Value by UUID. */
+#define SD_BLE_GATTC_READ (BLE_GATTC_SVC_BASE + 5) /**< Generic read. */
+#define SD_BLE_GATTC_CHAR_VALUES_READ (BLE_GATTC_SVC_BASE + 6) /**< Read multiple Characteristic Values. */
+#define SD_BLE_GATTC_WRITE (BLE_GATTC_SVC_BASE + 7) /**< Generic write. */
+#define SD_BLE_GATTC_HV_CONFIRM (BLE_GATTC_SVC_BASE + 8) /**< Handle Value Confirmation. */
/**
* @brief GATT Client Event IDs.
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/ble_gatts.h b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/ble_gatts.h
index 04d7f65..2b5ad11 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/ble_gatts.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/ble_gatts.h
@@ -56,20 +56,18 @@
/**
* @brief GATTS API SVC numbers.
*/
-enum BLE_GATTS_SVCS
-{
- SD_BLE_GATTS_SERVICE_ADD = BLE_GATTS_SVC_BASE, /**< Add a service. */
- SD_BLE_GATTS_INCLUDE_ADD, /**< Add an included service. */
- SD_BLE_GATTS_CHARACTERISTIC_ADD, /**< Add a characteristic. */
- SD_BLE_GATTS_DESCRIPTOR_ADD, /**< Add a generic attribute. */
- SD_BLE_GATTS_VALUE_SET, /**< Set an attribute value. */
- SD_BLE_GATTS_VALUE_GET, /**< Get an attribute value. */
- SD_BLE_GATTS_HVX, /**< Handle Value Notification or Indication. */
- SD_BLE_GATTS_SERVICE_CHANGED, /**< Perform a Service Changed Indication to one or more peers. */
- SD_BLE_GATTS_RW_AUTHORIZE_REPLY, /**< Reply to an authorization request for a read or write operation on one or more attributes. */
- SD_BLE_GATTS_SYS_ATTR_SET, /**< Set the persistent system attributes for a connection. */
- SD_BLE_GATTS_SYS_ATTR_GET, /**< Get updated persistent system attributes after terminating a connection. */
-};
+typedef unsigned char BLE_GATTS_SVCS; // enum
+#define SD_BLE_GATTS_SERVICE_ADD (BLE_GATTS_SVC_BASE + 0) /**< Add a service. */
+#define SD_BLE_GATTS_INCLUDE_ADD (BLE_GATTS_SVC_BASE + 1) /**< Add an included service. */
+#define SD_BLE_GATTS_CHARACTERISTIC_ADD (BLE_GATTS_SVC_BASE + 2) /**< Add a characteristic. */
+#define SD_BLE_GATTS_DESCRIPTOR_ADD (BLE_GATTS_SVC_BASE + 3) /**< Add a generic attribute. */
+#define SD_BLE_GATTS_VALUE_SET (BLE_GATTS_SVC_BASE + 4) /**< Set an attribute value. */
+#define SD_BLE_GATTS_VALUE_GET (BLE_GATTS_SVC_BASE + 5) /**< Get an attribute value. */
+#define SD_BLE_GATTS_HVX (BLE_GATTS_SVC_BASE + 6) /**< Handle Value Notification or Indication. */
+#define SD_BLE_GATTS_SERVICE_CHANGED (BLE_GATTS_SVC_BASE + 7) /**< Perform a Service Changed Indication to one or more peers. */
+#define SD_BLE_GATTS_RW_AUTHORIZE_REPLY (BLE_GATTS_SVC_BASE + 8) /**< Reply to an authorization request for a read or write operation on one or more attributes. */
+#define SD_BLE_GATTS_SYS_ATTR_SET (BLE_GATTS_SVC_BASE + 9) /**< Set the persistent system attributes for a connection. */
+#define SD_BLE_GATTS_SYS_ATTR_GET (BLE_GATTS_SVC_BASE + 10) /**< Get updated persistent system attributes after terminating a connection. */
/**
* @brief GATT Server Event IDs.
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/ble_l2cap.h b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/ble_l2cap.h
index 5728a49..8c8d1bb 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/ble_l2cap.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/ble_l2cap.h
@@ -52,12 +52,10 @@
* @{ */
/**@brief L2CAP API SVC numbers. */
-enum BLE_L2CAP_SVCS
-{
- SD_BLE_L2CAP_CID_REGISTER = BLE_L2CAP_SVC_BASE, /**< Register a CID. */
- SD_BLE_L2CAP_CID_UNREGISTER, /**< Unregister a CID. */
- SD_BLE_L2CAP_TX /**< Transmit a packet. */
-};
+typedef unsigned char BLE_L2CAP_SVCS; // enum
+#define SD_BLE_L2CAP_CID_REGISTER (BLE_L2CAP_SVC_BASE + 0) /**< Register a CID. */
+#define SD_BLE_L2CAP_CID_UNREGISTER (BLE_L2CAP_SVC_BASE + 1) /**< Unregister a CID. */
+#define SD_BLE_L2CAP_TX (BLE_L2CAP_SVC_BASE + 2) /**< Transmit a packet. */
/**@brief L2CAP Event IDs. */
enum BLE_L2CAP_EVTS
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/nrf_mbr.h b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/nrf_mbr.h
index 09b5808..565ea0b 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/nrf_mbr.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/nrf_mbr.h
@@ -63,10 +63,8 @@
* @{ */
/**@brief nRF Master Boot Record API SVC numbers. */
-enum NRF_MBR_SVCS
-{
- SD_MBR_COMMAND = MBR_SVC_BASE, /**< ::sd_mbr_command */
-};
+typedef unsigned char NRF_MBR_SVCS; // enum
+#define SD_MBR_COMMAND (MBR_SVC_BASE + 0) /**< ::sd_mbr_command */
/**@brief Possible values for ::sd_mbr_command_t.command */
enum NRF_MBR_COMMANDS
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/nrf_sdm.h b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/nrf_sdm.h
index 15b4c79..9a894f2 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/nrf_sdm.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/nrf_sdm.h
@@ -88,14 +88,12 @@ This is the offset where the first byte of the softdevice hex file is written.*/
* @{ */
/**@brief nRF SoftDevice Manager API SVC numbers. */
-enum NRF_SD_SVCS
-{
- SD_SOFTDEVICE_ENABLE = SDM_SVC_BASE, /**< ::sd_softdevice_enable */
- SD_SOFTDEVICE_DISABLE, /**< ::sd_softdevice_disable */
- SD_SOFTDEVICE_IS_ENABLED, /**< ::sd_softdevice_is_enabled */
- SD_SOFTDEVICE_VECTOR_TABLE_BASE_SET, /**< ::sd_softdevice_vector_table_base_set */
- SVC_SDM_LAST /**< Placeholder for last SDM SVC */
-};
+typedef unsigned char NRF_SD_SVCS; // enum
+#define SD_SOFTDEVICE_ENABLE (SDM_SVC_BASE + 0) /**< ::sd_softdevice_enable */
+#define SD_SOFTDEVICE_DISABLE (SDM_SVC_BASE + 1) /**< ::sd_softdevice_disable */
+#define SD_SOFTDEVICE_IS_ENABLED (SDM_SVC_BASE + 2) /**< ::sd_softdevice_is_enabled */
+#define SD_SOFTDEVICE_VECTOR_TABLE_BASE_SET (SDM_SVC_BASE + 3) /**< ::sd_softdevice_vector_table_base_set */
+#define SVC_SDM_LAST (SDM_SVC_BASE + 4) /**< Placeholder for last SDM SVC */
/**@brief Possible lfclk oscillator sources. */
enum NRF_CLOCK_LFCLKSRCS
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/nrf_soc.h b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/nrf_soc.h
index 6a96de0..2360fe9 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/nrf_soc.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s120/headers/nrf_soc.h
@@ -88,61 +88,59 @@
* @{ */
/**@brief The SVC numbers used by the SVC functions in the SoC library. */
-enum NRF_SOC_SVCS
-{
- SD_PPI_CHANNEL_ENABLE_GET = SOC_SVC_BASE,
- SD_PPI_CHANNEL_ENABLE_SET,
- SD_PPI_CHANNEL_ENABLE_CLR,
- SD_PPI_CHANNEL_ASSIGN,
- SD_PPI_GROUP_TASK_ENABLE,
- SD_PPI_GROUP_TASK_DISABLE,
- SD_PPI_GROUP_ASSIGN,
- SD_PPI_GROUP_GET,
- SD_FLASH_PAGE_ERASE,
- SD_FLASH_WRITE,
- SD_FLASH_PROTECT,
- SD_MUTEX_NEW = SOC_SVC_BASE_NOT_AVAILABLE,
- SD_MUTEX_ACQUIRE,
- SD_MUTEX_RELEASE,
- SD_NVIC_ENABLEIRQ,
- SD_NVIC_DISABLEIRQ,
- SD_NVIC_GETPENDINGIRQ,
- SD_NVIC_SETPENDINGIRQ,
- SD_NVIC_CLEARPENDINGIRQ,
- SD_NVIC_SETPRIORITY,
- SD_NVIC_GETPRIORITY,
- SD_NVIC_SYSTEMRESET,
- SD_NVIC_CRITICAL_REGION_ENTER,
- SD_NVIC_CRITICAL_REGION_EXIT,
- SD_RAND_APPLICATION_POOL_CAPACITY,
- SD_RAND_APPLICATION_BYTES_AVAILABLE,
- SD_RAND_APPLICATION_GET_VECTOR,
- SD_POWER_MODE_SET,
- SD_POWER_SYSTEM_OFF,
- SD_POWER_RESET_REASON_GET,
- SD_POWER_RESET_REASON_CLR,
- SD_POWER_POF_ENABLE,
- SD_POWER_POF_THRESHOLD_SET,
- SD_POWER_RAMON_SET,
- SD_POWER_RAMON_CLR,
- SD_POWER_RAMON_GET,
- SD_POWER_GPREGRET_SET,
- SD_POWER_GPREGRET_CLR,
- SD_POWER_GPREGRET_GET,
- SD_POWER_DCDC_MODE_SET,
- SD_APP_EVT_WAIT,
- SD_CLOCK_HFCLK_REQUEST,
- SD_CLOCK_HFCLK_RELEASE,
- SD_CLOCK_HFCLK_IS_RUNNING,
- SD_RADIO_NOTIFICATION_CFG_SET,
- SD_ECB_BLOCK_ENCRYPT,
- SD_RADIO_SESSION_OPEN,
- SD_RADIO_SESSION_CLOSE,
- SD_RADIO_REQUEST,
- SD_EVT_GET,
- SD_TEMP_GET,
- SVC_SOC_LAST
-};
+typedef unsigned char NRF_SOC_SVCS; // enum
+#define SD_PPI_CHANNEL_ENABLE_GET (SOC_SVC_BASE + 0)
+#define SD_PPI_CHANNEL_ENABLE_SET (SOC_SVC_BASE + 1)
+#define SD_PPI_CHANNEL_ENABLE_CLR (SOC_SVC_BASE + 2)
+#define SD_PPI_CHANNEL_ASSIGN (SOC_SVC_BASE + 3)
+#define SD_PPI_GROUP_TASK_ENABLE (SOC_SVC_BASE + 4)
+#define SD_PPI_GROUP_TASK_DISABLE (SOC_SVC_BASE + 5)
+#define SD_PPI_GROUP_ASSIGN (SOC_SVC_BASE + 6)
+#define SD_PPI_GROUP_GET (SOC_SVC_BASE + 7)
+#define SD_FLASH_PAGE_ERASE (SOC_SVC_BASE + 8)
+#define SD_FLASH_WRITE (SOC_SVC_BASE + 9)
+#define SD_FLASH_PROTECT (SOC_SVC_BASE + 10)
+#define SD_MUTEX_NEW (SOC_SVC_BASE_NOT_AVAILABLE + 0)
+#define SD_MUTEX_ACQUIRE (SOC_SVC_BASE_NOT_AVAILABLE + 1)
+#define SD_MUTEX_RELEASE (SOC_SVC_BASE_NOT_AVAILABLE + 2)
+#define SD_NVIC_ENABLEIRQ (SOC_SVC_BASE_NOT_AVAILABLE + 3)
+#define SD_NVIC_DISABLEIRQ (SOC_SVC_BASE_NOT_AVAILABLE + 4)
+#define SD_NVIC_GETPENDINGIRQ (SOC_SVC_BASE_NOT_AVAILABLE + 5)
+#define SD_NVIC_SETPENDINGIRQ (SOC_SVC_BASE_NOT_AVAILABLE + 6)
+#define SD_NVIC_CLEARPENDINGIRQ (SOC_SVC_BASE_NOT_AVAILABLE + 7)
+#define SD_NVIC_SETPRIORITY (SOC_SVC_BASE_NOT_AVAILABLE + 8)
+#define SD_NVIC_GETPRIORITY (SOC_SVC_BASE_NOT_AVAILABLE + 9)
+#define SD_NVIC_SYSTEMRESET (SOC_SVC_BASE_NOT_AVAILABLE + 10)
+#define SD_NVIC_CRITICAL_REGION_ENTER (SOC_SVC_BASE_NOT_AVAILABLE + 11)
+#define SD_NVIC_CRITICAL_REGION_EXIT (SOC_SVC_BASE_NOT_AVAILABLE + 12)
+#define SD_RAND_APPLICATION_POOL_CAPACITY (SOC_SVC_BASE_NOT_AVAILABLE + 13)
+#define SD_RAND_APPLICATION_BYTES_AVAILABLE (SOC_SVC_BASE_NOT_AVAILABLE + 14)
+#define SD_RAND_APPLICATION_GET_VECTOR (SOC_SVC_BASE_NOT_AVAILABLE + 15)
+#define SD_POWER_MODE_SET (SOC_SVC_BASE_NOT_AVAILABLE + 16)
+#define SD_POWER_SYSTEM_OFF (SOC_SVC_BASE_NOT_AVAILABLE + 17)
+#define SD_POWER_RESET_REASON_GET (SOC_SVC_BASE_NOT_AVAILABLE + 18)
+#define SD_POWER_RESET_REASON_CLR (SOC_SVC_BASE_NOT_AVAILABLE + 19)
+#define SD_POWER_POF_ENABLE (SOC_SVC_BASE_NOT_AVAILABLE + 20)
+#define SD_POWER_POF_THRESHOLD_SET (SOC_SVC_BASE_NOT_AVAILABLE + 21)
+#define SD_POWER_RAMON_SET (SOC_SVC_BASE_NOT_AVAILABLE + 22)
+#define SD_POWER_RAMON_CLR (SOC_SVC_BASE_NOT_AVAILABLE + 23)
+#define SD_POWER_RAMON_GET (SOC_SVC_BASE_NOT_AVAILABLE + 24)
+#define SD_POWER_GPREGRET_SET (SOC_SVC_BASE_NOT_AVAILABLE + 25)
+#define SD_POWER_GPREGRET_CLR (SOC_SVC_BASE_NOT_AVAILABLE + 26)
+#define SD_POWER_GPREGRET_GET (SOC_SVC_BASE_NOT_AVAILABLE + 27)
+#define SD_POWER_DCDC_MODE_SET (SOC_SVC_BASE_NOT_AVAILABLE + 28)
+#define SD_APP_EVT_WAIT (SOC_SVC_BASE_NOT_AVAILABLE + 29)
+#define SD_CLOCK_HFCLK_REQUEST (SOC_SVC_BASE_NOT_AVAILABLE + 30)
+#define SD_CLOCK_HFCLK_RELEASE (SOC_SVC_BASE_NOT_AVAILABLE + 31)
+#define SD_CLOCK_HFCLK_IS_RUNNING (SOC_SVC_BASE_NOT_AVAILABLE + 32)
+#define SD_RADIO_NOTIFICATION_CFG_SET (SOC_SVC_BASE_NOT_AVAILABLE + 33)
+#define SD_ECB_BLOCK_ENCRYPT (SOC_SVC_BASE_NOT_AVAILABLE + 34)
+#define SD_RADIO_SESSION_OPEN (SOC_SVC_BASE_NOT_AVAILABLE + 35)
+#define SD_RADIO_SESSION_CLOSE (SOC_SVC_BASE_NOT_AVAILABLE + 36)
+#define SD_RADIO_REQUEST (SOC_SVC_BASE_NOT_AVAILABLE + 37)
+#define SD_EVT_GET (SOC_SVC_BASE_NOT_AVAILABLE + 38)
+#define SD_TEMP_GET (SOC_SVC_BASE_NOT_AVAILABLE + 39)
+#define SVC_SOC_LAST (SOC_SVC_BASE_NOT_AVAILABLE + 40)
/**@brief Possible values of a ::nrf_mutex_t. */
enum NRF_MUTEX_VALUES
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/ble.h b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/ble.h
index fcef380..e6019b0 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/ble.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/ble.h
@@ -61,19 +61,17 @@
/**
* @brief Common API SVC numbers.
*/
-enum BLE_COMMON_SVCS
-{
- SD_BLE_ENABLE = BLE_SVC_BASE, /**< Enable and initialize the BLE stack */
- SD_BLE_EVT_GET, /**< Get an event from the pending events queue. */
- SD_BLE_TX_BUFFER_COUNT_GET, /**< Get the total number of available application transmission buffers from the BLE stack. */
- SD_BLE_UUID_VS_ADD, /**< Add a Vendor Specific UUID. */
- SD_BLE_UUID_DECODE, /**< Decode UUID bytes. */
- SD_BLE_UUID_ENCODE, /**< Encode UUID bytes. */
- SD_BLE_VERSION_GET, /**< Get the local version information (company id, Link Layer Version, Link Layer Subversion). */
- SD_BLE_USER_MEM_REPLY, /**< User Memory Reply. */
- SD_BLE_OPT_SET, /**< Set a BLE option. */
- SD_BLE_OPT_GET, /**< Get a BLE option. */
-};
+typedef unsigned char BLE_COMMON_SVCS; // enum
+#define SD_BLE_ENABLE (BLE_SVC_BASE + 0) /**< Enable and initialize the BLE stack */
+#define SD_BLE_EVT_GET (BLE_SVC_BASE + 1) /**< Get an event from the pending events queue. */
+#define SD_BLE_TX_BUFFER_COUNT_GET (BLE_SVC_BASE + 2) /**< Get the total number of available application transmission buffers from the BLE stack. */
+#define SD_BLE_UUID_VS_ADD (BLE_SVC_BASE + 3) /**< Add a Vendor Specific UUID. */
+#define SD_BLE_UUID_DECODE (BLE_SVC_BASE + 4) /**< Decode UUID bytes. */
+#define SD_BLE_UUID_ENCODE (BLE_SVC_BASE + 5) /**< Encode UUID bytes. */
+#define SD_BLE_VERSION_GET (BLE_SVC_BASE + 6) /**< Get the local version information (company id, Link Layer Version, Link Layer Subversion). */
+#define SD_BLE_USER_MEM_REPLY (BLE_SVC_BASE + 7) /**< User Memory Reply. */
+#define SD_BLE_OPT_SET (BLE_SVC_BASE + 8) /**< Set a BLE option. */
+#define SD_BLE_OPT_GET (BLE_SVC_BASE + 9) /**< Get a BLE option. */
/**
* @brief BLE Module Independent Event IDs.
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/ble_gap.h b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/ble_gap.h
index 78cc98f..bb08c06 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/ble_gap.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/ble_gap.h
@@ -52,36 +52,34 @@
/**@brief GAP API SVC numbers.
*/
-enum BLE_GAP_SVCS
-{
- SD_BLE_GAP_ADDRESS_SET = BLE_GAP_SVC_BASE, /**< Set own Bluetooth Address. */
- SD_BLE_GAP_ADDRESS_GET, /**< Get own Bluetooth Address. */
- SD_BLE_GAP_ADV_DATA_SET, /**< Set Advertising Data. */
- SD_BLE_GAP_ADV_START, /**< Start Advertising. */
- SD_BLE_GAP_ADV_STOP, /**< Stop Advertising. */
- SD_BLE_GAP_CONN_PARAM_UPDATE, /**< Connection Parameter Update. */
- SD_BLE_GAP_DISCONNECT, /**< Disconnect. */
- SD_BLE_GAP_TX_POWER_SET, /**< Set TX Power. */
- SD_BLE_GAP_APPEARANCE_SET, /**< Set Appearance. */
- SD_BLE_GAP_APPEARANCE_GET, /**< Get Appearance. */
- SD_BLE_GAP_PPCP_SET, /**< Set PPCP. */
- SD_BLE_GAP_PPCP_GET, /**< Get PPCP. */
- SD_BLE_GAP_DEVICE_NAME_SET, /**< Set Device Name. */
- SD_BLE_GAP_DEVICE_NAME_GET, /**< Get Device Name. */
- SD_BLE_GAP_AUTHENTICATE, /**< Initiate Pairing/Bonding. */
- SD_BLE_GAP_SEC_PARAMS_REPLY, /**< Reply with Security Parameters. */
- SD_BLE_GAP_AUTH_KEY_REPLY, /**< Reply with an authentication key. */
- SD_BLE_GAP_ENCRYPT, /**< Initiate encryption procedure. */
- SD_BLE_GAP_SEC_INFO_REPLY, /**< Reply with Security Information. */
- SD_BLE_GAP_CONN_SEC_GET, /**< Obtain connection security level. */
- SD_BLE_GAP_RSSI_START, /**< Start reporting of changes in RSSI. */
- SD_BLE_GAP_RSSI_STOP, /**< Stop reporting of changes in RSSI. */
- SD_BLE_GAP_SCAN_START, /**< Start Scanning. */
- SD_BLE_GAP_SCAN_STOP, /**< Stop Scanning. */
- SD_BLE_GAP_CONNECT, /**< Connect. */
- SD_BLE_GAP_CONNECT_CANCEL, /**< Cancel ongoing connection procedure. */
- SD_BLE_GAP_RSSI_GET, /**< Get the last RSSI sample. */
-};
+typedef unsigned char BLE_GAP_SVCS; // enum
+#define SD_BLE_GAP_ADDRESS_SET (BLE_GAP_SVC_BASE + 0) /**< Set own Bluetooth Address. */
+#define SD_BLE_GAP_ADDRESS_GET (BLE_GAP_SVC_BASE + 1) /**< Get own Bluetooth Address. */
+#define SD_BLE_GAP_ADV_DATA_SET (BLE_GAP_SVC_BASE + 2) /**< Set Advertising Data. */
+#define SD_BLE_GAP_ADV_START (BLE_GAP_SVC_BASE + 3) /**< Start Advertising. */
+#define SD_BLE_GAP_ADV_STOP (BLE_GAP_SVC_BASE + 4) /**< Stop Advertising. */
+#define SD_BLE_GAP_CONN_PARAM_UPDATE (BLE_GAP_SVC_BASE + 5) /**< Connection Parameter Update. */
+#define SD_BLE_GAP_DISCONNECT (BLE_GAP_SVC_BASE + 6) /**< Disconnect. */
+#define SD_BLE_GAP_TX_POWER_SET (BLE_GAP_SVC_BASE + 7) /**< Set TX Power. */
+#define SD_BLE_GAP_APPEARANCE_SET (BLE_GAP_SVC_BASE + 8) /**< Set Appearance. */
+#define SD_BLE_GAP_APPEARANCE_GET (BLE_GAP_SVC_BASE + 9) /**< Get Appearance. */
+#define SD_BLE_GAP_PPCP_SET (BLE_GAP_SVC_BASE + 10) /**< Set PPCP. */
+#define SD_BLE_GAP_PPCP_GET (BLE_GAP_SVC_BASE + 11) /**< Get PPCP. */
+#define SD_BLE_GAP_DEVICE_NAME_SET (BLE_GAP_SVC_BASE + 12) /**< Set Device Name. */
+#define SD_BLE_GAP_DEVICE_NAME_GET (BLE_GAP_SVC_BASE + 13) /**< Get Device Name. */
+#define SD_BLE_GAP_AUTHENTICATE (BLE_GAP_SVC_BASE + 14) /**< Initiate Pairing/Bonding. */
+#define SD_BLE_GAP_SEC_PARAMS_REPLY (BLE_GAP_SVC_BASE + 15) /**< Reply with Security Parameters. */
+#define SD_BLE_GAP_AUTH_KEY_REPLY (BLE_GAP_SVC_BASE + 16) /**< Reply with an authentication key. */
+#define SD_BLE_GAP_ENCRYPT (BLE_GAP_SVC_BASE + 17) /**< Initiate encryption procedure. */
+#define SD_BLE_GAP_SEC_INFO_REPLY (BLE_GAP_SVC_BASE + 18) /**< Reply with Security Information. */
+#define SD_BLE_GAP_CONN_SEC_GET (BLE_GAP_SVC_BASE + 19) /**< Obtain connection security level. */
+#define SD_BLE_GAP_RSSI_START (BLE_GAP_SVC_BASE + 20) /**< Start reporting of changes in RSSI. */
+#define SD_BLE_GAP_RSSI_STOP (BLE_GAP_SVC_BASE + 21) /**< Stop reporting of changes in RSSI. */
+#define SD_BLE_GAP_SCAN_START (BLE_GAP_SVC_BASE + 22) /**< Start Scanning. */
+#define SD_BLE_GAP_SCAN_STOP (BLE_GAP_SVC_BASE + 23) /**< Stop Scanning. */
+#define SD_BLE_GAP_CONNECT (BLE_GAP_SVC_BASE + 24) /**< Connect. */
+#define SD_BLE_GAP_CONNECT_CANCEL (BLE_GAP_SVC_BASE + 25) /**< Cancel ongoing connection procedure. */
+#define SD_BLE_GAP_RSSI_GET (BLE_GAP_SVC_BASE + 26) /**< Get the last RSSI sample. */
/**@brief GAP Event IDs.
* IDs that uniquely identify an event coming from the stack to the application.
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/ble_gattc.h b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/ble_gattc.h
index 6df99df..c3c6889 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/ble_gattc.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/ble_gattc.h
@@ -52,18 +52,16 @@
* @{ */
/**@brief GATTC API SVC numbers. */
-enum BLE_GATTC_SVCS
-{
- SD_BLE_GATTC_PRIMARY_SERVICES_DISCOVER = BLE_GATTC_SVC_BASE, /**< Primary Service Discovery. */
- SD_BLE_GATTC_RELATIONSHIPS_DISCOVER, /**< Relationship Discovery. */
- SD_BLE_GATTC_CHARACTERISTICS_DISCOVER, /**< Characteristic Discovery. */
- SD_BLE_GATTC_DESCRIPTORS_DISCOVER, /**< Characteristic Descriptor Discovery. */
- SD_BLE_GATTC_CHAR_VALUE_BY_UUID_READ, /**< Read Characteristic Value by UUID. */
- SD_BLE_GATTC_READ, /**< Generic read. */
- SD_BLE_GATTC_CHAR_VALUES_READ, /**< Read multiple Characteristic Values. */
- SD_BLE_GATTC_WRITE, /**< Generic write. */
- SD_BLE_GATTC_HV_CONFIRM /**< Handle Value Confirmation. */
-};
+typedef unsigned char BLE_GATTC_SVCS; // enum
+#define SD_BLE_GATTC_PRIMARY_SERVICES_DISCOVER (BLE_GATTC_SVC_BASE + 0) /**< Primary Service Discovery. */
+#define SD_BLE_GATTC_RELATIONSHIPS_DISCOVER (BLE_GATTC_SVC_BASE + 1) /**< Relationship Discovery. */
+#define SD_BLE_GATTC_CHARACTERISTICS_DISCOVER (BLE_GATTC_SVC_BASE + 2) /**< Characteristic Discovery. */
+#define SD_BLE_GATTC_DESCRIPTORS_DISCOVER (BLE_GATTC_SVC_BASE + 3) /**< Characteristic Descriptor Discovery. */
+#define SD_BLE_GATTC_CHAR_VALUE_BY_UUID_READ (BLE_GATTC_SVC_BASE + 4) /**< Read Characteristic Value by UUID. */
+#define SD_BLE_GATTC_READ (BLE_GATTC_SVC_BASE + 5) /**< Generic read. */
+#define SD_BLE_GATTC_CHAR_VALUES_READ (BLE_GATTC_SVC_BASE + 6) /**< Read multiple Characteristic Values. */
+#define SD_BLE_GATTC_WRITE (BLE_GATTC_SVC_BASE + 7) /**< Generic write. */
+#define SD_BLE_GATTC_HV_CONFIRM (BLE_GATTC_SVC_BASE + 8) /**< Handle Value Confirmation. */
/**
* @brief GATT Client Event IDs.
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/ble_gatts.h b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/ble_gatts.h
index d9ff8de..ad52866 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/ble_gatts.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/ble_gatts.h
@@ -56,20 +56,18 @@
/**
* @brief GATTS API SVC numbers.
*/
-enum BLE_GATTS_SVCS
-{
- SD_BLE_GATTS_SERVICE_ADD = BLE_GATTS_SVC_BASE, /**< Add a service. */
- SD_BLE_GATTS_INCLUDE_ADD, /**< Add an included service. */
- SD_BLE_GATTS_CHARACTERISTIC_ADD, /**< Add a characteristic. */
- SD_BLE_GATTS_DESCRIPTOR_ADD, /**< Add a generic attribute. */
- SD_BLE_GATTS_VALUE_SET, /**< Set an attribute value. */
- SD_BLE_GATTS_VALUE_GET, /**< Get an attribute value. */
- SD_BLE_GATTS_HVX, /**< Handle Value Notification or Indication. */
- SD_BLE_GATTS_SERVICE_CHANGED, /**< Perform a Service Changed Indication to one or more peers. */
- SD_BLE_GATTS_RW_AUTHORIZE_REPLY, /**< Reply to an authorization request for a read or write operation on one or more attributes. */
- SD_BLE_GATTS_SYS_ATTR_SET, /**< Set the persistent system attributes for a connection. */
- SD_BLE_GATTS_SYS_ATTR_GET, /**< Retrieve the persistent system attributes. */
-};
+typedef unsigned char BLE_GATTS_SVCS; // enum
+#define SD_BLE_GATTS_SERVICE_ADD (BLE_GATTS_SVC_BASE + 0) /**< Add a service. */
+#define SD_BLE_GATTS_INCLUDE_ADD (BLE_GATTS_SVC_BASE + 1) /**< Add an included service. */
+#define SD_BLE_GATTS_CHARACTERISTIC_ADD (BLE_GATTS_SVC_BASE + 2) /**< Add a characteristic. */
+#define SD_BLE_GATTS_DESCRIPTOR_ADD (BLE_GATTS_SVC_BASE + 3) /**< Add a generic attribute. */
+#define SD_BLE_GATTS_VALUE_SET (BLE_GATTS_SVC_BASE + 4) /**< Set an attribute value. */
+#define SD_BLE_GATTS_VALUE_GET (BLE_GATTS_SVC_BASE + 5) /**< Get an attribute value. */
+#define SD_BLE_GATTS_HVX (BLE_GATTS_SVC_BASE + 6) /**< Handle Value Notification or Indication. */
+#define SD_BLE_GATTS_SERVICE_CHANGED (BLE_GATTS_SVC_BASE + 7) /**< Perform a Service Changed Indication to one or more peers. */
+#define SD_BLE_GATTS_RW_AUTHORIZE_REPLY (BLE_GATTS_SVC_BASE + 8) /**< Reply to an authorization request for a read or write operation on one or more attributes. */
+#define SD_BLE_GATTS_SYS_ATTR_SET (BLE_GATTS_SVC_BASE + 9) /**< Set the persistent system attributes for a connection. */
+#define SD_BLE_GATTS_SYS_ATTR_GET (BLE_GATTS_SVC_BASE + 10) /**< Retrieve the persistent system attributes. */
/**
* @brief GATT Server Event IDs.
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/ble_l2cap.h b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/ble_l2cap.h
index 5728a49..8c8d1bb 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/ble_l2cap.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/ble_l2cap.h
@@ -52,12 +52,10 @@
* @{ */
/**@brief L2CAP API SVC numbers. */
-enum BLE_L2CAP_SVCS
-{
- SD_BLE_L2CAP_CID_REGISTER = BLE_L2CAP_SVC_BASE, /**< Register a CID. */
- SD_BLE_L2CAP_CID_UNREGISTER, /**< Unregister a CID. */
- SD_BLE_L2CAP_TX /**< Transmit a packet. */
-};
+typedef unsigned char BLE_L2CAP_SVCS; // enum
+#define SD_BLE_L2CAP_CID_REGISTER (BLE_L2CAP_SVC_BASE + 0) /**< Register a CID. */
+#define SD_BLE_L2CAP_CID_UNREGISTER (BLE_L2CAP_SVC_BASE + 1) /**< Unregister a CID. */
+#define SD_BLE_L2CAP_TX (BLE_L2CAP_SVC_BASE + 2) /**< Transmit a packet. */
/**@brief L2CAP Event IDs. */
enum BLE_L2CAP_EVTS
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/nrf_mbr.h b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/nrf_mbr.h
index 41960cb..b50c425 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/nrf_mbr.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/nrf_mbr.h
@@ -63,10 +63,8 @@
* @{ */
/**@brief nRF Master Boot Record API SVC numbers. */
-enum NRF_MBR_SVCS
-{
- SD_MBR_COMMAND = MBR_SVC_BASE, /**< ::sd_mbr_command */
-};
+typedef unsigned char NRF_MBR_SVCS; // enum
+#define SD_MBR_COMMAND (MBR_SVC_BASE + 0) /**< ::sd_mbr_command */
/**@brief Possible values for ::sd_mbr_command_t.command */
enum NRF_MBR_COMMANDS
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/nrf_sdm.h b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/nrf_sdm.h
index 15b4c79..9a894f2 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/nrf_sdm.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/nrf_sdm.h
@@ -88,14 +88,12 @@ This is the offset where the first byte of the softdevice hex file is written.*/
* @{ */
/**@brief nRF SoftDevice Manager API SVC numbers. */
-enum NRF_SD_SVCS
-{
- SD_SOFTDEVICE_ENABLE = SDM_SVC_BASE, /**< ::sd_softdevice_enable */
- SD_SOFTDEVICE_DISABLE, /**< ::sd_softdevice_disable */
- SD_SOFTDEVICE_IS_ENABLED, /**< ::sd_softdevice_is_enabled */
- SD_SOFTDEVICE_VECTOR_TABLE_BASE_SET, /**< ::sd_softdevice_vector_table_base_set */
- SVC_SDM_LAST /**< Placeholder for last SDM SVC */
-};
+typedef unsigned char NRF_SD_SVCS; // enum
+#define SD_SOFTDEVICE_ENABLE (SDM_SVC_BASE + 0) /**< ::sd_softdevice_enable */
+#define SD_SOFTDEVICE_DISABLE (SDM_SVC_BASE + 1) /**< ::sd_softdevice_disable */
+#define SD_SOFTDEVICE_IS_ENABLED (SDM_SVC_BASE + 2) /**< ::sd_softdevice_is_enabled */
+#define SD_SOFTDEVICE_VECTOR_TABLE_BASE_SET (SDM_SVC_BASE + 3) /**< ::sd_softdevice_vector_table_base_set */
+#define SVC_SDM_LAST (SDM_SVC_BASE + 4) /**< Placeholder for last SDM SVC */
/**@brief Possible lfclk oscillator sources. */
enum NRF_CLOCK_LFCLKSRCS
diff --git a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/nrf_soc.h b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/nrf_soc.h
index a9c0b79..aee19c5 100644
--- a/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/nrf_soc.h
+++ b/nRF51_SDK_8.1.0_b6ed55f/components/softdevice/s130/headers/nrf_soc.h
@@ -88,61 +88,59 @@
* @{ */
/**@brief The SVC numbers used by the SVC functions in the SoC library. */
-enum NRF_SOC_SVCS
-{
- SD_PPI_CHANNEL_ENABLE_GET = SOC_SVC_BASE,
- SD_PPI_CHANNEL_ENABLE_SET,
- SD_PPI_CHANNEL_ENABLE_CLR,
- SD_PPI_CHANNEL_ASSIGN,
- SD_PPI_GROUP_TASK_ENABLE,
- SD_PPI_GROUP_TASK_DISABLE,
- SD_PPI_GROUP_ASSIGN,
- SD_PPI_GROUP_GET,
- SD_FLASH_PAGE_ERASE,
- SD_FLASH_WRITE,
- SD_FLASH_PROTECT,
- SD_MUTEX_NEW = SOC_SVC_BASE_NOT_AVAILABLE,
- SD_MUTEX_ACQUIRE,
- SD_MUTEX_RELEASE,
- SD_NVIC_ENABLEIRQ,
- SD_NVIC_DISABLEIRQ,
- SD_NVIC_GETPENDINGIRQ,
- SD_NVIC_SETPENDINGIRQ,
- SD_NVIC_CLEARPENDINGIRQ,
- SD_NVIC_SETPRIORITY,
- SD_NVIC_GETPRIORITY,
- SD_NVIC_SYSTEMRESET,