Skip to content

Commit 8b068b3

Browse files
authored
Merge pull request #448 from thomasvdwege/master
Adding getter for the initialized value of BLEDevice
2 parents 5222d21 + a8f98ea commit 8b068b3

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

cpp_utils/BLEDevice.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,4 +527,8 @@ esp_err_t BLEDevice::setMTU(uint16_t mtu) {
527527
uint16_t BLEDevice::getMTU() {
528528
return m_localMTU;
529529
}
530+
531+
bool BLEDevice::getInitialized() {
532+
return initialized;
533+
}
530534
#endif // CONFIG_BT_ENABLED

cpp_utils/BLEDevice.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class BLEDevice {
4242
static void setSecurityCallbacks(BLESecurityCallbacks* pCallbacks);
4343
static esp_err_t setMTU(uint16_t mtu);
4444
static uint16_t getMTU();
45+
static bool getInitialized(); // Returns the state of the device, is it initialized or not?
4546

4647
private:
4748
static BLEServer *m_pServer;

0 commit comments

Comments
 (0)