You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
957 B
36 lines
957 B
#include <stdint.h>
|
|
#include <string.h>
|
|
#include <stdbool.h>
|
|
#include <stdio.h>
|
|
|
|
#define PROFILE_NUM 1
|
|
#define PROFILE_APP_ID 0
|
|
#define BT_BD_ADDR_STR "%02x:%02x:%02x:%02x:%02x:%02x"
|
|
#define BT_BD_ADDR_HEX(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]
|
|
#define ESP_GATT_SPP_SERVICE_UUID \
|
|
{ \
|
|
0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0, 0x93, 0xF3, 0xA3, 0xB5, 0x01, 0x00, 0x40, 0x6E \
|
|
}
|
|
#define SCAN_ALL_THE_TIME 0
|
|
|
|
enum
|
|
{
|
|
SPP_IDX_SVC,
|
|
|
|
SPP_IDX_SPP_DATA_NTY_VAL,
|
|
SPP_IDX_SPP_DATA_NTF_CFG,
|
|
|
|
SPP_IDX_SPP_DATA_RECV_VAL,
|
|
|
|
// SPP_IDX_SPP_COMMAND_VAL,
|
|
|
|
#ifdef SUPPORT_HEARTBEAT
|
|
SPP_IDX_SPP_HEARTBEAT_VAL,
|
|
SPP_IDX_SPP_HEARTBEAT_CFG,
|
|
#endif
|
|
|
|
SPP_IDX_NB,
|
|
};
|
|
|
|
void ble_init();
|
|
void ble_gattc_write_char(char *string, uint8_t string_length);
|