summaryrefslogtreecommitdiff
path: root/src/components/ble/NimbleController.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/ble/NimbleController.h')
-rw-r--r--src/components/ble/NimbleController.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/components/ble/NimbleController.h b/src/components/ble/NimbleController.h
index 2b300e63..7219ba6b 100644
--- a/src/components/ble/NimbleController.h
+++ b/src/components/ble/NimbleController.h
@@ -14,6 +14,7 @@
#include "components/ble/CurrentTimeService.h"
#include "components/ble/DeviceInformationService.h"
#include "components/ble/DfuService.h"
+#include "components/ble/FSService.h"
#include "components/ble/HeartRateService.h"
#include "components/ble/ImmediateAlertService.h"
#include "components/ble/MusicService.h"
@@ -22,7 +23,6 @@
#include "components/ble/MotionService.h"
#include "components/ble/weather/WeatherService.h"
#include "components/fs/FS.h"
-#include "components/ble/FSService.h"
namespace Pinetime {
namespace Drivers {
@@ -42,18 +42,19 @@ namespace Pinetime {
public:
NimbleController(Pinetime::System::SystemTask& systemTask,
- Pinetime::Controllers::Ble& bleController,
+ Ble& bleController,
DateTime& dateTimeController,
- Pinetime::Controllers::NotificationManager& notificationManager,
- Controllers::Battery& batteryController,
+ NotificationManager& notificationManager,
+ Battery& batteryController,
Pinetime::Drivers::SpiNorFlash& spiNorFlash,
- Controllers::HeartRateController& heartRateController,
- Controllers::MotionController& motionController,
- Pinetime::Controllers::FS& fs);
+ HeartRateController& heartRateController,
+ MotionController& motionController,
+ FS& fs);
void Init();
void StartAdvertising();
int OnGAPEvent(ble_gap_event* event);
+ /* these are not implemented yet
int OnDiscoveryEvent(uint16_t i, const ble_gatt_error* pError, const ble_gatt_svc* pSvc);
int OnCTSCharacteristicDiscoveryEvent(uint16_t connectionHandle, const ble_gatt_error* error, const ble_gatt_chr* characteristic);
int OnANSCharacteristicDiscoveryEvent(uint16_t connectionHandle, const ble_gatt_error* error, const ble_gatt_chr* characteristic);
@@ -62,6 +63,7 @@ namespace Pinetime {
const ble_gatt_error* error,
uint16_t characteristicValueHandle,
const ble_gatt_dsc* descriptor);
+ */
void StartDiscovery();
@@ -83,7 +85,9 @@ namespace Pinetime {
void RestartFastAdv() {
fastAdvCount = 0;
- }
+ };
+
+ void SwitchAirplaneMode(bool enabled);
private:
void PersistBond(struct ble_gap_conn_desc& desc);
@@ -91,12 +95,12 @@ namespace Pinetime {
static constexpr const char* deviceName = "InfiniTime";
Pinetime::System::SystemTask& systemTask;
- Pinetime::Controllers::Ble& bleController;
+ Ble& bleController;
DateTime& dateTimeController;
- Pinetime::Controllers::NotificationManager& notificationManager;
+ NotificationManager& notificationManager;
Pinetime::Drivers::SpiNorFlash& spiNorFlash;
- Pinetime::Controllers::FS& fs;
- Pinetime::Controllers::DfuService dfuService;
+ FS& fs;
+ DfuService dfuService;
DeviceInformationService deviceInformationService;
CurrentTimeClient currentTimeClient;