21 lines
844 B
C
Executable File
21 lines
844 B
C
Executable File
#include <esp_log.h>
|
|
#include <nimble/nimble_port.h>
|
|
#include <services/gap/ble_svc_gap.h>
|
|
#include <services/gatt/ble_svc_gatt.h>
|
|
#include <host/ble_hs.h>
|
|
|
|
#include "hid_keyboard.h"
|
|
#include "utils.h"
|
|
|
|
#define GATT_DEVICE_INFO_UUID 0x180A
|
|
#define GATT_MANUFACTURER_NAME_UUID 0x2A29
|
|
#define GAP_DEVICE_NAME "Stream Deck Lookalike"
|
|
#define GAP_ADV_APPAREANCE 0x03C1
|
|
#define ADV_DEVICE_NAME "Stream Deck"
|
|
#define MANUFACTURER_NAME "Sobralia's lab"
|
|
|
|
int init_gatt_server(void);
|
|
void gatt_advertise(void);
|
|
int gatt_device_info_access_callback(uint16_t connection, uint16_t attribute, struct ble_gatt_access_ctxt *context, void *arg);
|
|
int gatt_battery_level_access_callback(uint16_t connection, uint16_t attribute, struct ble_gatt_access_ctxt *context, void *arg);
|