29 lines
514 B
C
29 lines
514 B
C
|
#ifndef __BLE_GATTS_SERVER_H
|
||
|
#define __BLE_GATTS_SERVER_H
|
||
|
|
||
|
#include <stdio.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 notify_data_fun(int id, uint8_t *data, uint32_t len);
|
||
|
|
||
|
#endif
|