2020-04-23 18:02:28 -07:00
|
|
|
#pragma once
|
|
|
|
|
|
2023-01-21 15:07:30 +01:00
|
|
|
#include <Arduino.h>
|
|
|
|
|
|
2020-04-23 18:02:28 -07:00
|
|
|
class NRF52Bluetooth
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
void setup();
|
2020-10-30 17:05:32 +08:00
|
|
|
void shutdown();
|
2022-02-01 18:32:26 -06:00
|
|
|
void clearBonds();
|
2020-04-23 18:02:28 -07:00
|
|
|
|
2022-08-22 16:41:23 -05:00
|
|
|
private:
|
|
|
|
|
static void onConnectionSecured(uint16_t conn_handle);
|
|
|
|
|
void convertToUint8(uint8_t target[4], uint32_t source);
|
|
|
|
|
static bool onPairingPasskey(uint16_t conn_handle, uint8_t const passkey[6], bool match_request);
|
|
|
|
|
static void onPairingCompleted(uint16_t conn_handle, uint8_t auth_status);
|
|
|
|
|
};
|