Encapsulate nimble code into NimbleController.

Handle all GAP events.
This commit is contained in:
JF
2020-04-19 21:26:09 +02:00
parent dd6aecbf6b
commit 2c9ce1cfc7
6 changed files with 177 additions and 78 deletions

View File

@@ -0,0 +1,19 @@
#pragma once
#include <cstdint>
#include <host/ble_gap.h>
namespace Pinetime {
namespace Controllers {
class NimbleController {
public:
void Init();
void StartAdvertising();
int OnGAPEvent(ble_gap_event *event);
private:
static constexpr char* deviceName = "Pinetime-JF";
uint8_t addrType;
};
}
}