headset.h 791 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef MPBLEDEMO2
  2. #define MPBLEDEMO2
  3. #include "ble_wechat_util.h"
  4. #include <stdbool.h>
  5. #define CMD_BUTTON_NONE 0
  6. #define CMD_BUTTON_CLICK 1
  7. #define CMD_BUTTON_LONG_PRESS_START 2
  8. #define CMD_BUTTON_LONG_PRESS_END 3
  9. #define CMD_AUTH 4
  10. #define CMD_INIT 5
  11. #define CMD_SENDDAT_TEST 6
  12. #define DEVICE_TYPE "gh_1bafe245c2cb"
  13. #define DEVICE_ID "mpbledemo2"
  14. #define PROTO_VERSION 0x010002
  15. #define AUTH_PROTO 1
  16. #define AUTH_METHOD 1
  17. #define MAC_ADDR "C5:B1:83:86:B5:1D"
  18. #define MD5_TYPE_AND_ID 0x79A3B59E726AAC941559CCBB1DE42FDD
  19. typedef struct {
  20. int button_cmd;
  21. } mpbledemo2_info;
  22. typedef struct {
  23. bool indication_state;
  24. bool light_state;
  25. bool auth_state;
  26. bool init_state;
  27. bool auth_send;
  28. bool init_send;
  29. }mpbledemo2_state;
  30. extern data_handler mpbledemo2_data_handler;
  31. #endif