aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/ble/NimbleController.h
diff options
context:
space:
mode:
authorMax Friedrich <minacode@users.noreply.github.com>2022-04-19 00:40:29 +0200
committerGitHub <noreply@github.com>2022-04-19 00:40:29 +0200
commitf84a0a38972e6b6d9a537dc9de2e2c416312f882 (patch)
tree3ce9dab83f8b6af8e9df1c8d3aa0219f5a67acbe /src/components/ble/NimbleController.h
parenta1db9fca136493eef38e536abaa660dd6ce23e57 (diff)
parented91b5a9981898078ad8e4cf105b5d52c7b63dfe (diff)
Merge branch 'develop' into remove-nm-reference
Diffstat (limited to 'src/components/ble/NimbleController.h')
-rw-r--r--src/components/ble/NimbleController.h35
1 files changed, 14 insertions, 21 deletions
diff --git a/src/components/ble/NimbleController.h b/src/components/ble/NimbleController.h
index 6c409740..000231fe 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,27 +42,17 @@ 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);
-
- 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);
- int OnCurrentTimeReadResult(uint16_t connectionHandle, const ble_gatt_error* error, ble_gatt_attr* attribute);
- int OnANSDescriptorDiscoveryEventCallback(uint16_t connectionHandle,
- const ble_gatt_error* error,
- uint16_t characteristicValueHandle,
- const ble_gatt_dsc* descriptor);
-
void StartDiscovery();
Pinetime::Controllers::MusicService& music() {
@@ -83,7 +73,10 @@ namespace Pinetime {
void RestartFastAdv() {
fastAdvCount = 0;
- }
+ };
+
+ void EnableRadio();
+ void DisableRadio();
private:
void PersistBond(struct ble_gap_conn_desc& desc);
@@ -91,11 +84,11 @@ namespace Pinetime {
static constexpr const char* deviceName = "InfiniTime";
Pinetime::System::SystemTask& systemTask;
- Pinetime::Controllers::Ble& bleController;
+ Ble& bleController;
DateTime& dateTimeController;
Pinetime::Drivers::SpiNorFlash& spiNorFlash;
- Pinetime::Controllers::FS& fs;
- Pinetime::Controllers::DfuService dfuService;
+ FS& fs;
+ DfuService dfuService;
DeviceInformationService deviceInformationService;
CurrentTimeClient currentTimeClient;