2022-02-15 06:52:00 +13:00
|
|
|
#pragma once
|
2023-02-03 08:50:10 -06:00
|
|
|
#include "BluetoothCommon.h"
|
2022-02-15 06:52:00 +13:00
|
|
|
|
2026-01-03 21:19:24 +01:00
|
|
|
class NimbleBluetooth : BluetoothApi {
|
|
|
|
|
public:
|
|
|
|
|
void setup();
|
|
|
|
|
void shutdown();
|
|
|
|
|
void deinit();
|
|
|
|
|
void clearBonds();
|
|
|
|
|
bool isActive();
|
|
|
|
|
bool isConnected();
|
|
|
|
|
int getRssi();
|
|
|
|
|
void sendLog(const uint8_t *logMessage, size_t length);
|
2025-12-30 17:23:50 -06:00
|
|
|
#if defined(NIMBLE_TWO)
|
2026-01-03 21:19:24 +01:00
|
|
|
void startAdvertising();
|
2025-12-30 17:23:50 -06:00
|
|
|
#endif
|
2026-01-03 21:19:24 +01:00
|
|
|
bool isDeInit = false;
|
2022-08-12 14:14:14 -05:00
|
|
|
|
2026-01-03 21:19:24 +01:00
|
|
|
private:
|
|
|
|
|
void setupService();
|
2025-12-30 17:23:50 -06:00
|
|
|
#if !defined(NIMBLE_TWO)
|
2026-01-03 21:19:24 +01:00
|
|
|
void startAdvertising();
|
2025-12-30 17:23:50 -06:00
|
|
|
#endif
|
2022-02-15 06:52:00 +13:00
|
|
|
};
|
|
|
|
|
|
2024-03-03 13:56:55 -06:00
|
|
|
void setBluetoothEnable(bool enable);
|
|
|
|
|
void clearNVS();
|