Skip to content

Commit b0a1941

Browse files
committed
Config rework - WIP
1 parent 2a0a475 commit b0a1941

File tree

70 files changed

+529
-627
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+529
-627
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ jobs:
7878
7979
[env:esp32c3]
8080
board = esp32-c3-devkitm-1
81-
build_flags = '-DCONFIG_BT_NIMBLE_EXT_ADV=1'
81+
build_flags = '-DMYNEWT_VAL_BLE_EXT_ADV=1'
8282
8383
[env:esp32s3]
8484
board = esp32-s3-devkitc-1
85-
build_flags = '-DCONFIG_BT_NIMBLE_EXT_ADV=1'
85+
build_flags = '-DMYNEWT_VAL_BLE_EXT_ADV=1'
8686
EOF
8787
cp ${{ matrix.example }}/* example/src/
8888
platformio run -d example
@@ -163,19 +163,19 @@ jobs:
163163
164164
[env:esp32c3]
165165
board = esp32-c3-devkitm-1
166-
build_flags = '-DCONFIG_BT_NIMBLE_EXT_ADV=1'
166+
build_flags = '-DMYNEWT_VAL_BLE_EXT_ADV=1'
167167
168168
[env:esp32s3]
169169
board = esp32-s3-devkitc-1
170-
build_flags = '-DCONFIG_BT_NIMBLE_EXT_ADV=1'
170+
build_flags = '-DMYNEWT_VAL_BLE_EXT_ADV=1'
171171
172172
[env:esp32c6]
173173
board = esp32-c6-devkitc-1
174-
build_flags = '-DCONFIG_BT_NIMBLE_EXT_ADV=1'
174+
build_flags = '-DMYNEWT_VAL_BLE_EXT_ADV=1'
175175
176176
[env:esp32h2]
177177
board = esp32-h2-devkitm-1
178-
build_flags = '-DCONFIG_BT_NIMBLE_EXT_ADV=1'
178+
build_flags = '-DMYNEWT_VAL_BLE_EXT_ADV=1'
179179
EOF
180180
cp ${{ matrix.example }}/* example/src/
181181
platformio run -d example
@@ -224,7 +224,7 @@ jobs:
224224
- uses: actions/checkout@v4
225225
- name: Set config for BT5
226226
run: |
227-
sed -i '0,/#include \"nimconfig_rename.h\"/a #define CONFIG_BT_NIMBLE_EXT_ADV 1' ./src/nimconfig.h
227+
sed -i '0,/#include \"nimconfig_rename.h\"/a #define MYNEWT_VAL_BLE_EXT_ADV 1' ./src/nimconfig.h
228228
- name: Build BT5 arduino-esp32
229229
uses: arduino/compile-sketches@v1.1.0
230230
with:
@@ -276,7 +276,7 @@ jobs:
276276
- uses: actions/checkout@v4
277277
- name: Set config for BT5
278278
run: |
279-
echo "-DCONFIG_BT_NIMBLE_EXT_ADV=1" > ${{ matrix.example }}/build_opt.h
279+
echo "-DMYNEWT_VAL_BLE_EXT_ADV=1" > ${{ matrix.example }}/build_opt.h
280280
- name: Build BT5 n-able Arduino
281281
uses: arduino/compile-sketches@v1.1.0
282282
with:

docs/Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2416,7 +2416,7 @@ INCLUDE_FILE_PATTERNS =
24162416
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
24172417

24182418
PREDEFINED = _DOXYGEN_ \
2419-
CONFIG_BT_ENABLED \
2419+
CONFIG_BT_NIMBLE_ENABLED \
24202420
CONFIG_BT_NIMBLE_ROLE_CENTRAL \
24212421
CONFIG_BT_NIMBLE_ROLE_OBSERVER \
24222422
CONFIG_BT_NIMBLE_ROLE_PERIPHERAL \

examples/Bluetooth_5/NimBLE_extended_client/NimBLE_extended_client.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#include <Arduino.h>
1212
#include <NimBLEDevice.h>
13-
#if !CONFIG_BT_NIMBLE_EXT_ADV
13+
#if !MYNEWT_VAL(BLE_EXT_ADV)
1414
# error Must enable extended advertising, see nimconfig.h file.
1515
#endif
1616

examples/Bluetooth_5/NimBLE_extended_scan/NimBLE_extended_scan.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#include <Arduino.h>
1111
#include <NimBLEDevice.h>
12-
#if !CONFIG_BT_NIMBLE_EXT_ADV
12+
#if !MYNEWT_VAL(BLE_EXT_ADV)
1313
# error Must enable extended advertising, see nimconfig.h file.
1414
#endif
1515

examples/Bluetooth_5/NimBLE_extended_server/NimBLE_extended_server.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#include <Arduino.h>
1616
#include <NimBLEDevice.h>
17-
#if !CONFIG_BT_NIMBLE_EXT_ADV
17+
#if !MYNEWT_VAL(BLE_EXT_ADV)
1818
# error Must enable extended advertising, see nimconfig.h file.
1919
#endif
2020

examples/Bluetooth_5/NimBLE_multi_advertiser/NimBLE_multi_advertiser.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#include <Arduino.h>
1616
#include <NimBLEDevice.h>
17-
#if !CONFIG_BT_NIMBLE_EXT_ADV
17+
#if !MYNEWT_VAL(BLE_EXT_ADV)
1818
# error Must enable extended advertising, see nimconfig.h file.
1919
#endif
2020

examples/L2CAP/L2CAP_Client/L2CAP_Client.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#include <Arduino.h>
66
#include <NimBLEDevice.h>
77

8-
#if CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM <= 0
9-
# error "CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM must be set to 1 or greater"
8+
#if MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM) < 1
9+
# error "MYNEWT_VAL_BLE_L2CAP_COC_MAX_NUM must be set to 1 or greater"
1010
#endif
1111

1212
// See the following for generating UUIDs:

examples/NimBLE_Client/NimBLE_Client.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ bool connectToServer() {
113113

114114
/** No client to reuse? Create a new one. */
115115
if (!pClient) {
116-
if (NimBLEDevice::getCreatedClientCount() >= NIMBLE_MAX_CONNECTIONS) {
116+
if (NimBLEDevice::getCreatedClientCount() >= MYNEWT_VAL(BLE_MAX_CONNECTIONS)) {
117117
Serial.printf("Max clients reached - no more connections available\n");
118118
return false;
119119
}

src/NimBLE2904.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818
#include "NimBLE2904.h"
19-
#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
19+
#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
2020

2121
NimBLE2904::NimBLE2904(NimBLECharacteristic* pChr)
2222
: NimBLEDescriptor(NimBLEUUID((uint16_t)0x2904), BLE_GATT_CHR_F_READ, sizeof(NimBLE2904Data), pChr) {
@@ -69,4 +69,4 @@ void NimBLE2904::setUnit(uint16_t unit) {
6969
setValue(m_data);
7070
} // setUnit
7171

72-
#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
72+
#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)

src/NimBLE2904.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
#ifndef NIMBLE_CPP_2904_H_
1919
#define NIMBLE_CPP_2904_H_
2020

21-
#include "nimconfig.h"
22-
#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
21+
#include "syscfg/syscfg.h"
22+
#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
2323

2424
# include "NimBLEDescriptor.h"
2525

@@ -79,5 +79,5 @@ class NimBLE2904 : public NimBLEDescriptor {
7979
NimBLE2904Data m_data{};
8080
}; // NimBLE2904
8181

82-
#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL
82+
#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
8383
#endif // NIMBLE_CPP_2904_H_

0 commit comments

Comments
 (0)