ble.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #ifndef __BLE_H_
  2. #define __BLE_H_
  3. typedef enum{
  4. UNVAIL,
  5. BLE_BASE_CONNECT,
  6. BLE_AUD_CONNECT,
  7. }BLE_STATUE;
  8. typedef struct{
  9. //BLE_STATUE Ble_Statue;
  10. unsigned char BleRingInit:1; //指环清除列表
  11. //unsigned char BleIswork:1; //
  12. unsigned char Base_Conected:1;
  13. unsigned char Audio_Conected:1;
  14. }Sut_BLE;
  15. extern Sut_BLE Sut_ble;
  16. typedef enum
  17. {
  18. BLE_PTT_PRESS=0x01,
  19. BLE_PTT_FREE=0x02,
  20. BLE_CONNECT_SUC=0x03,
  21. BLE_CONNECT_FAIL=0x04,
  22. BLE_AUDCONNECT_SUC=0x05,
  23. BLE_BREAK_AUDCONNECT_SUC=0x06,
  24. BLE_SETSPK_SUC=0XE0,
  25. BLE_SETMIC_SUC=0XE1,
  26. BLE_CLEAR_LIST=0XA3,
  27. }BLE_Result;
  28. extern const char BLE_BASE_01[4];
  29. extern const char BLE_BASE_02[4];
  30. extern const char Ble_IO2AT[5];//从IO控制模式切换到AT模式
  31. extern const char Ble_CLEAR_LIST[5];
  32. void gpioBleConfigOutput(void);
  33. void BLE_at_process(char *r_buffer,int read_size);
  34. void bleCb(void *param);
  35. void Ble_Match_IOCTR(bool ctr);
  36. void BT_Match_IOctr(bool ctr);
  37. void Ble_handler(unsigned int interval);
  38. void BLE_Open();
  39. void BLE_Close();
  40. void start_ringClearList();
  41. void Send_BLE_EVEN();
  42. #endif