中科蓝讯 --AB532X系列TWS的接口调用
TWS的按键操作:
长按mode按键TWS配对,长按连接手机/回连手机
if(xcfg_cb.bt_tws_en && xcfg_cb.bt_tws_pair_mode == 2){if(bt_tws_is_connected()) {} else {bt_tws_search_slave();printf("bt_tws_search_slave\n");}
}
if(bt_nor_is_connected()){//手机已经连接printf("disconnect with boletooth\n");bsp_clr_mute_sta();bt_nor_disconnect();//M键断开手机蓝牙.或者bt_disconnect()}else{printf("connect with boletooth\n");bt_connect();
// bt_nor_connect();//M键回连手机蓝牙}
从提示音得到主从机信息,和蓝牙耳机的有所不同
void func_bt_warning(void);
if(left_warning) { //left channel //slavefunc_cb.mp3_res_play(RES_BUF_LEFT_CH_MP3, RES_LEN_LEFT_CH_MP3);printf(" slave slave \n");get_tws_chanl=2;//副机等于2}if(right_warning) { //right channel //masterdelay_5ms(200);func_cb.mp3_res_play(RES_BUF_RIGHT_CH_MP3, RES_LEN_RIGHT_CH_MP3);printf(" master master \n");get_tws_chanl=1;//主机等于1 }
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
