#include "include.h" #include "api.h" #include "func.h" uint8_t cfg_hid_type = BT_HID_TYPE; #if BT_HID_MENU_EN void bsp_bt_hid_tog_conn(void) { if (xcfg_cb.bt_hid_menu_en) { bsp_bt_chkclr_warning(BT_WARN_HID_CON|BT_WARN_HID_DISCON); bt_cb.hid_menu_flag = 2; //按键连接/断开HID,置上标志,用于播放提示音 if (bt_hid_is_connected()) { bt_hid_disconnect(); } else { bt_hid_connect(); } } } #endif void bsp_bt_hid_photo(void) { bt_hid_key(HID_KEY_ENTER); //enter key, android 4.0以上 delay_5ms(10); bt_hid_consumer(HID_KEY_VOL_UP); //consumer key vol_up, ios } //点击左边屏幕中心位置 void bsp_bt_hid_screen_left(void) { bt_hid_touch_screen(0); delay_5ms(10); bt_hid_touch_screen(1); } //点击右边屏幕中心位置 void bsp_bt_hid_screen_right(void) { bt_hid_touch_screen(0x11); delay_5ms(10); bt_hid_touch_screen(0x10); }