summaryrefslogtreecommitdiff
path: root/src/Components/Ble/DfuService.h
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-05-11 18:50:37 +0200
committerJF <jf@codingfield.com>2020-05-11 18:50:37 +0200
commitee05577dd62c64d0e6a2e497b75710c7a1351557 (patch)
tree36d36462bd1c3aaa06df46b0bf6086111c83df2b /src/Components/Ble/DfuService.h
parent0b8e6c3fa20457bce931b1d289f187e46fc68307 (diff)
Fix race conditions on SPI and integrate the SPI NOR Flash driver into DFUService (WIP)
Diffstat (limited to 'src/Components/Ble/DfuService.h')
-rw-r--r--src/Components/Ble/DfuService.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Components/Ble/DfuService.h b/src/Components/Ble/DfuService.h
index f59ba2c9..1406d6ad 100644
--- a/src/Components/Ble/DfuService.h
+++ b/src/Components/Ble/DfuService.h
@@ -8,17 +8,22 @@ namespace Pinetime {
namespace System {
class SystemTask;
}
+ namespace Drivers {
+ class SpiNorFlash;
+ }
namespace Controllers {
class Ble;
class DfuService {
public:
- DfuService(Pinetime::System::SystemTask& systemTask, Pinetime::Controllers::Ble& bleController);
+ DfuService(Pinetime::System::SystemTask& systemTask, Pinetime::Controllers::Ble& bleController,
+ Pinetime::Drivers::SpiNorFlash& spiNorFlash);
void Init();
int OnServiceData(uint16_t connectionHandle, uint16_t attributeHandle, ble_gatt_access_ctxt *context);
private:
Pinetime::System::SystemTask& systemTask;
Pinetime::Controllers::Ble& bleController;
+ Pinetime::Drivers::SpiNorFlash& spiNorFlash;
static constexpr uint16_t dfuServiceId {0x1530};
static constexpr uint16_t packetCharacteristicId {0x1532};