123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- #ifndef AICARE_PROFILE_H__
- #define AICARE_PROFILE_H__
- /*
- * INCLUDES (包含头文件)
- */
- #include <stdio.h>
- #include <string.h>
- #include "gap_api.h"
- #include "gatt_api.h"
- #include "gatt_sig_uuid.h"
- /*
- * MACROS (宏定义)
- */
- /*
- * CONSTANTS (常量定义)
- */
- // Simple Profile attributes index.
- enum
- {
- AICARE_IDX_SERVICE,
- AICARE_IDX_CHAR1_DECLARATION,
- AICARE_IDX_CHAR1_VALUE,
-
- // AICARE_IDX_CHAR1_AICARE_DESCRIPTION,
- AICARE_IDX_CHAR2_DECLARATION,
- AICARE_IDX_CHAR2_VALUE,
- AICARE_IDX_CHAR2_CFG,
- // AICARE_IDX_CHAR2_AICARE_DESCRIPTION,
- AICARE_IDX_NB,
- };
- // Simple GATT Profile Service UUID
- //#define AICARE_SVC_UUID 0xFFD0
- //#define AICARE_CHAR1_UUID 0xFFD1
- //#define AICARE_CHAR2_UUID 0xFFD2
- //#define AICARE_SVC_UUID {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80,0x00, 0x10, 0x00, 0x00, 0x17, 0xff, 0x00, 0x00}
- //#define AICARE_CHAR1_UUID {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80,0x00, 0x10, 0x00, 0x00, 0x04, 0xff, 0x00, 0x00}
- //#define AICARE_CHAR2_UUID {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80,0x00, 0x10, 0x00, 0x00, 0x02, 0xff, 0x00, 0x00}
- #define AICARE_SVC_UUID {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80,0x00, 0x10, 0x00, 0x00, 0xE0, 0xff, 0x00, 0x00}
- #define AICARE_CHAR1_UUID {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80,0x00, 0x10, 0x00, 0x00, 0xE1, 0xff, 0x00, 0x00}
- #define AICARE_CHAR2_UUID {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80,0x00, 0x10, 0x00, 0x00, 0xE2, 0xff, 0x00, 0x00}
- //#define AICARE_SVC_UUID {0xFC, 0x1A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
- //#define AICARE_CHAR1_UUID {0xFC, 0x1A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x30, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00}
- //#define AICARE_CHAR2_UUID {0xFC, 0x1A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x30, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00}
- //#define AICARE_CHAR_RX_UUID {0xF3, 0xFA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x02}
- //#define AICARE_CHAR_UUID_NOTI {0xF4, 0xFA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x02}
- void aicare_gatt_add_service(void);
- void aicare_send_notify(uint8_t *p_data,uint16_t len);
- #endif
|