Encapsulate nimble code into NimbleController.
Handle all GAP events.
This commit is contained in:
19
src/Components/Ble/NimbleController.h
Normal file
19
src/Components/Ble/NimbleController.h
Normal 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;
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user