bleh/include/BLEh.h
2023-06-25 17:00:09 +02:00

22 lines
496 B
C

#pragma once
#include <stdint.h>
#include "host/ble_gatt.h"
#define CHAR_PRESENTATION_FORMAT_SIZE 7
struct char_pres_format {
uint8_t format;
uint8_t exponent;
uint16_t unit;
uint8_t namespc;
uint8_t descrH;
uint8_t descrL;
};
void initBLE(char* name);
void ble_advertise(void);
void set_gatt_services(struct ble_gatt_svc_def* svcs, uint16_t num);
void print_service(struct ble_gatt_svc_def* svcs);
void notify(uint16_t svc_ind, uint16_t chr_ind, void* value, size_t value_size);