| 1234567891011121314151617181920212223242526272829303132333435363738 |
- #ifndef __BLE_CLIENT_H
- #define __BLE_CLIENT_H
- /* ___________________________________________________________________________________
- * HEAD(1B) | HID(0 or 5B) | MIC(0 or 32B) | CMD(TLV Format)
- * ___________________________________________________________________________________
- */
- /* TLV Format
- * __________________________________________________________
- * TYPE(1B) | LENGTH(1B) | VALUE(0 or nB)
- * __________________________________________________________
- */
- #define WIRELESS_HEAD_POS 0
- #define WIRELESS_PAYLOAD_POS 1
- #define WIRELESS_CMD_DATA_TYPE_POS 0
- #define WIRELESS_CMD_DATA_LENGTH_POS 1
- #define WIRELESS_CMD_DATA_VALUE_POS 2
- #define WIRELESS_HEADER_HID_BIT 0x01
- #define WIRELESS_HEADER_AUDIO_BIT 0x02
- #define WIRELESS_HEADER_CTRL_BIT 0x04
- #define WIRELESS_DATA_LENGTH_HID WIRELESS_PACKET_LEN_HID
- #define WIRELESS_DATA_LENGTH_AUDIO WIRELESS_PACKET_LEN_AUDIO
- void wireless_client_init(void);
- //void ble_app_proc(void);
- void ble_enter_sleep_proc(void);
- void ble_exit_sleep_proc(void);
- void wireless_send_ctrl_cmd(uint8_t type, uint8_t length, uint8_t *value);
- #endif
|