TinyCTS
Bluetooth Current Time Service client and server for Arduino
Loading...
Searching...
No Matches
TinyCTSPicoBLE.h
Go to the documentation of this file.
1
6
7#pragma once
8#include <BLE.h>
9
10namespace tiny_cts {
11
20inline bool ctsPicoBegin(const char* name, bool pairing) {
21 static bool started = false;
22 static bool paired = false;
23 if (started) return paired || !pairing;
24 if (pairing) BLE.setSecurity(BLESecurityJustWorks);
25 BLE.begin(name);
26 started = true;
27 paired = pairing;
28 return true;
29}
30
31} // namespace tiny_cts
bool ctsPicoBegin(const char *name, bool pairing)
Definition TinyCTSPicoBLE.h:20