-
-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
53 changed files
with
616 additions
and
364 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
esp-nimble-cpp | ||
NimBLE-Arduino | ||
Copyright 2020-2024 Ryan Powell <[email protected]> and | ||
esp-nimble-cpp, NimBLE-Arduino contributors. | ||
|
||
The Initial Developer of some parts of this library, which are copied from, | ||
derived from, or inspired by is, esp32-snippets, Copyright 2017 Neil Kolban. | ||
|
||
If this library is used for commercial purposes, it is requested that the user consider | ||
making a donation and/or sponsoring this project to support it's ongoing development. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
/* | ||
* NimBLE2904.cpp | ||
* Copyright 2020-2024 Ryan Powell <[email protected]> and | ||
* esp-nimble-cpp, NimBLE-Arduino contributors. | ||
* | ||
* Created: on March 13, 2020 | ||
* Author H2zero | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* Originally: | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* BLE2904.cpp | ||
* | ||
* Created on: Dec 23, 2017 | ||
* Author: kolban | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#include "nimconfig.h" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
/* | ||
* NimBLE2904.h | ||
* Copyright 2020-2024 Ryan Powell <[email protected]> and | ||
* esp-nimble-cpp, NimBLE-Arduino contributors. | ||
* | ||
* Created: on March 13, 2020 | ||
* Author H2zero | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* Originally: | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* BLE2904.h | ||
* | ||
* Created on: Dec 23, 2017 | ||
* Author: kolban | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#ifndef NIMBLE_CPP_2904_H_ | ||
|
@@ -23,8 +26,8 @@ | |
struct NimBLE2904Data { | ||
uint8_t m_format{0}; | ||
int8_t m_exponent{0}; | ||
uint16_t m_unit{0x2700}; // Unitless; See https://www.bluetooth.com/specifications/assigned-numbers/units | ||
uint8_t m_namespace{1}; // 1 = Bluetooth SIG Assigned Numbers | ||
uint16_t m_unit{0x2700}; // Unitless; See https://www.bluetooth.com/specifications/assigned-numbers/units | ||
uint8_t m_namespace{1}; // 1 = Bluetooth SIG Assigned Numbers | ||
uint16_t m_description{0}; // unknown description | ||
} __attribute__((packed)); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
/* | ||
* NimBLEAddress.cpp | ||
* Copyright 2020-2024 Ryan Powell <[email protected]> and | ||
* esp-nimble-cpp, NimBLE-Arduino contributors. | ||
* | ||
* Created: on Jan 24 2020 | ||
* Author H2zero | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* Originally: | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* BLEAddress.cpp | ||
* | ||
* Created on: Jul 2, 2017 | ||
* Author: kolban | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#include "nimconfig.h" | ||
#if defined(CONFIG_BT_ENABLED) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
/* | ||
* NimBLEAddress.h | ||
* Copyright 2020-2024 Ryan Powell <[email protected]> and | ||
* esp-nimble-cpp, NimBLE-Arduino contributors. | ||
* | ||
* Created: on Jan 24 2020 | ||
* Author H2zero | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* Originally: | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* BLEAddress.h | ||
* | ||
* Created on: Jul 2, 2017 | ||
* Author: kolban | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#ifndef NIMBLE_CPP_ADDRESS_H_ | ||
|
@@ -59,8 +62,8 @@ class NimBLEAddress : private ble_addr_t { | |
const NimBLEAddress& reverseByteOrder(); | ||
bool operator==(const NimBLEAddress& rhs) const; | ||
bool operator!=(const NimBLEAddress& rhs) const; | ||
operator std::string() const; | ||
operator uint64_t() const; | ||
operator std::string() const; | ||
operator uint64_t() const; | ||
}; | ||
|
||
#endif /* CONFIG_BT_ENABLED */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
/* | ||
* NimBLEAdvertisedDevice.cpp | ||
* Copyright 2020-2024 Ryan Powell <[email protected]> and | ||
* esp-nimble-cpp, NimBLE-Arduino contributors. | ||
* | ||
* Created: on Jan 24 2020 | ||
* Author H2zero | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* Originally: | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* BLEAdvertisedDevice.cpp | ||
* | ||
* Created on: Jul 3, 2017 | ||
* Author: kolban | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#include "nimconfig.h" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
/* | ||
* NimBLEAdvertisedDevice.h | ||
* Copyright 2020-2024 Ryan Powell <[email protected]> and | ||
* esp-nimble-cpp, NimBLE-Arduino contributors. | ||
* | ||
* Created: on Jan 24 2020 | ||
* Author H2zero | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* Originally: | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* BLEAdvertisedDevice.h | ||
* | ||
* Created on: Jul 3, 2017 | ||
* Author: kolban | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#ifndef NIMBLE_CPP_ADVERTISED_DEVICE_H_ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
/* | ||
* NimBLEAdvertisementData.cpp | ||
* Copyright 2020-2024 Ryan Powell <[email protected]> and | ||
* esp-nimble-cpp, NimBLE-Arduino contributors. | ||
* | ||
* Created: on November 24, 2024 | ||
* Author H2zero | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#include "nimconfig.h" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
/* | ||
* NimBLEAdvertisementData.h | ||
* Copyright 2020-2024 Ryan Powell <[email protected]> and | ||
* esp-nimble-cpp, NimBLE-Arduino contributors. | ||
* | ||
* Created: on November 24, 2024 | ||
* Author H2zero | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#ifndef NIMBLE_CPP_ADVERTISEMENT_DATA_H_ | ||
|
@@ -13,9 +22,9 @@ | |
#if (defined(CONFIG_BT_ENABLED) && defined(CONFIG_BT_NIMBLE_ROLE_BROADCASTER) && !CONFIG_BT_NIMBLE_EXT_ADV) || \ | ||
defined(_DOXYGEN_) | ||
|
||
#include <cstdint> | ||
#include <string> | ||
#include <vector> | ||
# include <cstdint> | ||
# include <string> | ||
# include <vector> | ||
|
||
class NimBLEUUID; | ||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
/* | ||
* NimBLEAdvertising.cpp | ||
* Copyright 2020-2024 Ryan Powell <[email protected]> and | ||
* esp-nimble-cpp, NimBLE-Arduino contributors. | ||
* | ||
* Created: on March 3, 2020 | ||
* Author H2zero | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* Originally: | ||
* | ||
* BLEAdvertising.cpp | ||
* | ||
* This class encapsulates advertising a BLE Server. | ||
* Created on: Jun 21, 2017 | ||
* Author: kolban | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#include "nimconfig.h" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
/* | ||
* NimBLEAdvertising.h | ||
* Copyright 2020-2024 Ryan Powell <[email protected]> and | ||
* esp-nimble-cpp, NimBLE-Arduino contributors. | ||
* | ||
* Created: on March 3, 2020 | ||
* Author H2zero | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* Originally: | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* BLEAdvertising.h | ||
* | ||
* Created on: Jun 21, 2017 | ||
* Author: kolban | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#ifndef NIMBLE_CPP_ADVERTISING_H_ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
/* | ||
* NimBLEAttValue.cpp | ||
* Copyright 2020-2024 Ryan Powell <[email protected]> and | ||
* esp-nimble-cpp, NimBLE-Arduino contributors. | ||
* | ||
* Created: on July 17, 2024 | ||
* Author H2zero | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#include "nimconfig.h" | ||
|
@@ -32,8 +41,7 @@ NimBLEAttValue::NimBLEAttValue(uint16_t init_len, uint16_t max_len) | |
} | ||
|
||
// Value constructor implementation. | ||
NimBLEAttValue::NimBLEAttValue(const uint8_t *value, uint16_t len, uint16_t max_len) | ||
: NimBLEAttValue(len, max_len) { | ||
NimBLEAttValue::NimBLEAttValue(const uint8_t* value, uint16_t len, uint16_t max_len) : NimBLEAttValue(len, max_len) { | ||
memcpy(m_attr_value, value, len); | ||
m_attr_value[len] = '\0'; | ||
m_attr_len = len; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
/* | ||
* NimBLEAttValue.h | ||
* Copyright 2020-2024 Ryan Powell <[email protected]> and | ||
* esp-nimble-cpp, NimBLE-Arduino contributors. | ||
* | ||
* Created: on March 18, 2021 | ||
* Author H2zero | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#ifndef NIMBLE_CPP_ATTVALUE_H | ||
|
Oops, something went wrong.