Files
firmware/src/platform/nrf52/NRF52Bluetooth.h

22 lines
589 B
C
Raw Normal View History

2020-04-23 18:02:28 -07:00
#pragma once
2023-02-03 08:50:10 -06:00
#include "BluetoothCommon.h"
2023-01-21 15:07:30 +01:00
#include <Arduino.h>
2023-02-03 08:50:10 -06:00
class NRF52Bluetooth : BluetoothApi
2020-04-23 18:02:28 -07:00
{
public:
void setup();
2020-10-30 17:05:32 +08:00
void shutdown();
void startDisabled();
void resumeAdvertising();
void clearBonds();
2023-02-03 08:50:10 -06:00
bool isConnected();
int getRssi();
2020-04-23 18:02:28 -07: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);
};