aicare_profile.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #ifndef AICARE_PROFILE_H__
  2. #define AICARE_PROFILE_H__
  3. /*
  4. * INCLUDES (包含头文件)
  5. */
  6. #include <stdio.h>
  7. #include <string.h>
  8. #include "gap_api.h"
  9. #include "gatt_api.h"
  10. #include "gatt_sig_uuid.h"
  11. /*
  12. * MACROS (宏定义)
  13. */
  14. /*
  15. * CONSTANTS (常量定义)
  16. */
  17. // Simple Profile attributes index.
  18. enum
  19. {
  20. AICARE_IDX_SERVICE,
  21. AICARE_IDX_CHAR1_DECLARATION,
  22. AICARE_IDX_CHAR1_VALUE,
  23. // AICARE_IDX_CHAR1_AICARE_DESCRIPTION,
  24. AICARE_IDX_CHAR2_DECLARATION,
  25. AICARE_IDX_CHAR2_VALUE,
  26. AICARE_IDX_CHAR2_CFG,
  27. // AICARE_IDX_CHAR2_AICARE_DESCRIPTION,
  28. AICARE_IDX_NB,
  29. };
  30. // Simple GATT Profile Service UUID
  31. //#define AICARE_SVC_UUID 0xFFD0
  32. //#define AICARE_CHAR1_UUID 0xFFD1
  33. //#define AICARE_CHAR2_UUID 0xFFD2
  34. //#define AICARE_SVC_UUID {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80,0x00, 0x10, 0x00, 0x00, 0x17, 0xff, 0x00, 0x00}
  35. //#define AICARE_CHAR1_UUID {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80,0x00, 0x10, 0x00, 0x00, 0x04, 0xff, 0x00, 0x00}
  36. //#define AICARE_CHAR2_UUID {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80,0x00, 0x10, 0x00, 0x00, 0x02, 0xff, 0x00, 0x00}
  37. #define AICARE_SVC_UUID {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80,0x00, 0x10, 0x00, 0x00, 0xE0, 0xff, 0x00, 0x00}
  38. #define AICARE_CHAR1_UUID {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80,0x00, 0x10, 0x00, 0x00, 0xE1, 0xff, 0x00, 0x00}
  39. #define AICARE_CHAR2_UUID {0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80,0x00, 0x10, 0x00, 0x00, 0xE2, 0xff, 0x00, 0x00}
  40. //#define AICARE_SVC_UUID {0xFC, 0x1A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
  41. //#define AICARE_CHAR1_UUID {0xFC, 0x1A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x30, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00}
  42. //#define AICARE_CHAR2_UUID {0xFC, 0x1A, 0x30, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x30, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00}
  43. //#define AICARE_CHAR_RX_UUID {0xF3, 0xFA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x02}
  44. //#define AICARE_CHAR_UUID_NOTI {0xF4, 0xFA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x02}
  45. void aicare_gatt_add_service(void);
  46. void aicare_send_notify(uint8_t *p_data,uint16_t len);
  47. #endif