Skip to content

Commit c2a9470

Browse files
committed
Update documentation.
1 parent 972e08b commit c2a9470

File tree

6 files changed

+478
-373
lines changed

6 files changed

+478
-373
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ Tested and working with esp32-arduino in Arduino IDE and platform IO.
4242

4343
# Using
4444
This library is intended to be compatible with the original ESP32 BLE functions and types with minor changes.
45-
See: [The migration guide](docs/Migration_guide.md) for details.
45+
46+
If you have not used the original Bluedroid library please refer to the [New user guide](docs/New_user_guide.md).
47+
48+
If you are familiar with the original library, see: [The migration guide](docs/Migration_guide.md) for details about breaking changes and migration.
4649

4750
Also see [Improvements_and_updates](docs/Improvements_and_updates.md) for information about non-breaking changes.
4851

@@ -54,7 +57,7 @@ More advanced examples highlighting many available features are in examples/ Nim
5457

5558
Beacon examples provided by @beegee-tokyo are in examples/ BLE_Beacon_Scanner, BLE_EddystoneTLM_Beacon, BLE_EddystoneURL_Beacon.
5659

57-
Change the settings in the `nimconfig.h` file to customize NimBLE to your project, such as increasing max connections, default is 3.
60+
Change the settings in the `src/nimconfig.h` file to customize NimBLE to your project, such as increasing max connections, default is 3.
5861

5962
**Note To increase max connections in Arduino it is also required to change the controller max connections defined in sdkconfig.h.**
6063

docs/BREAKING_API_CHANGES.md

Lines changed: 0 additions & 238 deletions
This file was deleted.

docs/Improvements_and_updates.md

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
# Improvements and updates
22

3+
Many improvements have been made to this library vs the original, this is a brief overview of the most significant changes.
4+
Refer to the [class documentation](https://h2zero.github.io/esp-nimble-cpp/annotated.html) for futher information on class specifics.
5+
6+
* [Server](#server)
7+
* [Client](#client)
8+
* [General](#general)
9+
<br/>
10+
11+
<a name="server"></a>
312
# Server
413

5-
NimBLECharacteristic::setValue(const T &s)
6-
NimBLEDescriptor::setValue(const T &s)
14+
`NimBLECharacteristic::setValue(const T &s)`
15+
`NimBLEDescriptor::setValue(const T &s)`
716

817
Now use a template to accomodate standard and custom types/values.
918

@@ -27,7 +36,7 @@ struct my_struct{
2736
```
2837
This will send the struct to the recieving client when read or a notification sent.
2938

30-
NimBLECharacteristic::getValue now takes an optional timestamp parameter which will update it's value with
39+
`NimBLECharacteristic::getValue` now takes an optional timestamp parameter which will update it's value with
3140
the time the last value was recieved. In addition an overloaded template has been added to retrieve the value
3241
as a type specified by the user.
3342

@@ -51,10 +60,11 @@ it's characteristics / descriptors will remain valid and the service can be re-a
5160
using `NimBLEServer::addService`.
5261
<br/>
5362

63+
<a name="client"></a>
5464
# Client
5565

56-
NimBLERemoteCharacteristic::readValue(time_t\*, bool)
57-
NimBLERemoteDescriptor::readValue(bool)
66+
`NimBLERemoteCharacteristic::readValue(time_t\*, bool)`
67+
`NimBLERemoteDescriptor::readValue(bool)`
5868

5969
Have been added as templates to allow reading the values as any specified type.
6070

@@ -73,14 +83,14 @@ struct my_struct{
7383
```
7484
<br/>
7585

76-
NimBLERemoteCharacteristic::registerForNotify
86+
`NimBLERemoteCharacteristic::registerForNotify`
7787
Has been **deprecated** as now the internally stored characteristic value is updated when notification/indication is recieved.
7888

79-
NimBLERemoteCharacteristic::subscribe and NimBLERemoteCharacteristic::unsubscribe have been implemented to replace it.
80-
A callback is no longer requred to get the most recent value unless timing is important. Instead, the application can call NimBLERemoteCharacteristic::getValue to
89+
`NimBLERemoteCharacteristic::subscribe` and `NimBLERemoteCharacteristic::unsubscribe` have been implemented to replace it.
90+
A callback is no longer requred to get the most recent value unless timing is important. Instead, the application can call `NimBLERemoteCharacteristic::getValue` to
8191
get the last updated value any time.
8292

83-
In addition NimBLERemoteCharacteristic::readValue and NimBLERemoteCharacteristic::getValue take an optional timestamp parameter which will update it's value with
93+
In addition `NimBLERemoteCharacteristic::readValue` and `NimBLERemoteCharacteristic::getValue` take an optional timestamp parameter which will update it's value with
8494
the time the last value was recieved.
8595

8696
> NimBLEClient::getService
@@ -93,24 +103,23 @@ the specified attribute from the peripheral.
93103
These changes allow more control for the user to manage the resources used for the attributes.
94104
<br/>
95105

96-
NimBLEClient::connect() can now be called without an address or advertised device parameter. This will connect to the
97-
device with the address previously set when last connected or set with NimBLEDevice::setPeerAddress().
106+
`NimBLEClient::connect()` can now be called without an address or advertised device parameter. This will connect to the
107+
device with the address previously set when last connected or set with `NimBLEDevice::setPeerAddress()`.
98108

109+
<a name="general"></a>
99110
# General
100-
To reduce resource use all instances of std::map have been replaced with std::vector.
111+
To reduce resource use all instances of `std::map` have been replaced with `std::vector`.
101112

102-
Use of FreeRTOS::Semaphore has been removed as it was consuming too much ram, the related files have been left in place to accomodate application use.
113+
Use of `FreeRTOS::Semaphore` has been removed as it was consuming too much ram, the related files have been left in place to accomodate application use.
103114

104-
Operators `==`, `!=` and `std::string` have been added to NimBLEAddress and NimBLEUUID for easier comparison and logging.
115+
Operators `==`, `!=` and `std::string` have been added to `NimBLEAddress` and `NimBLEUUID` for easier comparison and logging.
105116

106-
New constructor for NimBLEUUID(uint32_t, uint16_t, uint16_t, uint64_t) added to lower memory use vs string construction. See: [#21](https://github.com/h2zero/NimBLE-Arduino/pull/21).
117+
New constructor for `NimBLEUUID(uint32_t, uint16_t, uint16_t, uint64_t)` added to lower memory use vs string construction. See: [#21](https://github.com/h2zero/NimBLE-Arduino/pull/21).
107118

108-
Security/pairing operations are now handled in the respective NimBLEClientCallbacks and NimBLEServerCallbacks classes, NimBLESecurity(deprecated) remains for backward compatibility.
119+
Security/pairing operations are now handled in the respective `NimBLEClientCallbacks` and `NimBLEServerCallbacks` classes, `NimBLESecurity`(deprecated) remains for backward compatibility.
109120

110121
Configuration options have been added to add or remove debugging information, when disabled (default) significatly reduces binary size.
111122
In ESP-IDF the options are in menuconfig: `Main menu -> ESP-NimBLE-cpp configuration`.
112123
For Arduino the options must be commented / uncommented in nimconfig.h.
113-
114-
Many more internal improvements have been made as well, this is a brief overview. Refer to the class docs for futher information on class specifics.
115124
<br/>
116125

0 commit comments

Comments
 (0)