pile_com_stm32/main/tmp/ble_gatts_server.h
2024-02-23 17:21:13 +08:00

37 lines
587 B
C

#ifndef __BLE_GATTS_SERVER_H
#define __BLE_GATTS_SERVER_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define SPP_DATA_MAX_LEN (512)
/* Attributes State Machine */
enum
{
IDX_SVC,
/* gWordVar data write */
IDX_CHAR_A,
IDX_CHAR_VAL_A,
IDX_CHAR_CFG_A,
/* gWordVar data notify */
SPP_IDX_SPP_DATA_NOTIFY_CHAR,
SPP_IDX_SPP_DATA_NTY_VAL,
SPP_IDX_SPP_DATA_NTF_CFG,
HRS_IDX_NB,
};
/* 定时上报的数据内容 */
extern uint8_t notify_data[500];
extern uint32_t notify_len;
void ble_gatts_server_init(void);
#endif