#include "include.h"
#include "api.h"


#if BT_HID_MANU_EN
void bsp_bt_hid_tog_conn(void)
{
    if (xcfg_cb.bt_hid_manu_en) {
        f_bt.hid_menu_flag = 2;     //Press the key to connect/disconnect the HID, set the sign for playing the prompt tone
        if (bt_hid_is_connected()) {
            bt_hid_disconnect();
        } else {
            bt_hid_connect();
        }
    }
}
#endif

bool bsp_bt_hid_photo(u16 keycode)
{
//    if ((xcfg_cb.bt_hid_en) && (bt_hid_is_connected())) {
//        bt_hid_key(HID_KEY_ENTER);              //enter key, android 4.0以上
//        delay_5ms(10);
//        bt_hid_consumer(keycode);               //consumer key vol_up or vol_down, ios
//        return true;
//    }
    return false;
}

bool bsp_bt_hid_vol_change(u16 keycode)
{
#if BT_A2DP_VOL_HID_CTRL_EN
    if ((xcfg_cb.bt_hid_en) && (bt_hid_is_connected())) {
        bt_hid_consumer(keycode);               //consumer key vol_up or vol_down, ios
        return true;
    }
#endif
    return false;
}

//Click the center of the left screen
void bsp_bt_hid_screen_left(void)
{
    bt_hid_touch_screen(0);
    delay_5ms(10);
    bt_hid_touch_screen(1);
}



//Click the center of the right screen
void bsp_bt_hid_screen_right(void)
{
    bt_hid_touch_screen(0x11);
    delay_5ms(10);
    bt_hid_touch_screen(0x10);
}
