InfiniTime/src/Components/Ble/NimbleController.h

29 lines
687 B
C
Raw Normal View History

#pragma once
#include <cstdint>
#include "DeviceInformationService.h"
#include "CurrentTimeClient.h"
#include <host/ble_gap.h>
namespace Pinetime {
namespace Controllers {
2020-04-22 14:19:36 -04:00
class DateTime;
class NimbleController {
public:
2020-04-22 14:19:36 -04:00
NimbleController(DateTime& dateTimeController);
void Init();
void StartAdvertising();
int OnGAPEvent(ble_gap_event *event);
private:
static constexpr char* deviceName = "Pinetime-JF";
2020-04-22 14:19:36 -04:00
DateTime& dateTimeController;
DeviceInformationService deviceInformationService;
CurrentTimeClient currentTimeClient;
uint8_t addrType;
2020-04-22 14:19:36 -04:00
uint16_t connectionHandle;
};
}
}