TeensyNanoExoCode
Loading...
Searching...
No Matches
GattDb.h
Go to the documentation of this file.
1#ifndef GATT_DB_H
2#define GATT_DB_H
3
4
5#if defined(ARDUINO_ARDUINO_NANO33BLE) | defined(ARDUINO_NANO_RP2040_CONNECT)
6#include "Arduino.h"
7#include "ArduinoBLE.h"
8
9
10class GattDb
11{
12 private:
13 const uint8_t BUFFERS_FIXED_LENGTH = false;
14 public:
15 const uint8_t BUFFER_SIZE = 128;
16 //https://stackoverflow.com/questions/10052135/expected-identifier-before-string-constant
17 /* Weirdness with initializer lists, had to use curly braces. */
18 BLEService UARTService{"6E400001-B5A3-F393-E0A9-E50E24DCCA9E"};
19 BLECharacteristic TXChar{"6E400003-B5A3-F393-E0A9-E50E24DCCA9E", BLERead | BLENotify | BLEBroadcast, BUFFER_SIZE, BUFFERS_FIXED_LENGTH};
20 BLECharacteristic RXChar{"6E400002-B5A3-F393-E0A9-E50E24DCCA9E", BLEWriteWithoutResponse | BLEWrite | BLENotify, BUFFER_SIZE, BUFFERS_FIXED_LENGTH};
21 /*
22 Payton 1/4/23
23 defining new characteristics for the board info
24 */
25 // Service and Characteristics for exo info
26 BLEService UARTServiceDeviceInfo{"e0271458-8c6a-11ed-a1eb-0242ac120002"}; // Serivce UUID for sending exo data
27 BLECharacteristic PCBChar{"e0271459-8c6a-11ed-a1eb-0242ac120002", BLERead, BUFFER_SIZE, BUFFERS_FIXED_LENGTH}; // Characteristic for pcb
28 BLECharacteristic FirmwareChar{"e0271460-8c6a-11ed-a1eb-0242ac120002", BLERead, BUFFER_SIZE, BUFFERS_FIXED_LENGTH}; // Characteristic for firmware
29 BLECharacteristic DeviceChar{"e0271461-8c6a-11ed-a1eb-0242ac120002", BLERead, BUFFER_SIZE, BUFFERS_FIXED_LENGTH}; // Characteristic for device
30
31 // Service and CHaracteristics for error reporting
32 BLEService ErrorService{"33b65d42-611c-11ed-9b6a-0242ac120002"}; // Service for error reporting
33 BLECharacteristic ErrorChar{"33b65d43-611c-11ed-9b6a-0242ac120002", BLERead | BLENotify, BUFFER_SIZE, BUFFERS_FIXED_LENGTH}; // Characteristic for error reporting
34};
35
36#endif
37#endif