32 lines
620 B
C
32 lines
620 B
C
#ifndef __BLE_GATTS_SERVER_H
|
|
#define __BLE_GATTS_SERVER_H
|
|
|
|
#include <stdio.h>
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
/* Attributes State Machine */
|
|
enum
|
|
{
|
|
IDX_SVC,
|
|
|
|
/* gWordVar data write */
|
|
IDX_DATA_READ_WRITE_CHAR,
|
|
IDX_DATA_READ_WRITE_VAL,
|
|
IDX_DATA_READ_WRITE_CFG,
|
|
|
|
/* gWordVar data notify */
|
|
IDX_DATA_NOTIFY_CHAR,
|
|
IDX_DATA_NOTIFY_VAL,
|
|
IDX_DATA_NOTIFY_CFG,
|
|
|
|
IDX_NB,
|
|
};
|
|
|
|
void ble_gatts_server_init(void);
|
|
void ble_write_data(int id, uint8_t *data, int len);
|
|
void ble_read_data(uint8_t *data, int len);
|
|
void ble_server_notify(uint8_t *data, int len);
|
|
|
|
#endif |