Skip to content

Commit 97483ae

Browse files
committed
Config rework - WIP
1 parent dffd290 commit 97483ae

File tree

65 files changed

+490
-580
lines changed

Some content is hidden

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

65 files changed

+490
-580
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 6 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

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_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_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_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_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
8383
#endif // NIMBLE_CPP_2904_H_

src/NimBLEAddress.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#ifndef NIMBLE_CPP_ADDRESS_H_
1919
#define NIMBLE_CPP_ADDRESS_H_
2020

21-
#include "nimconfig.h"
21+
#include "syscfg/syscfg.h"
2222
#if CONFIG_BT_ENABLED
2323

2424
# if defined(CONFIG_NIMBLE_CPP_IDF)

0 commit comments

Comments
 (0)