使用场景:TWS连接后,从机的按键消息发送到主机
一.发送按键消息给对耳
void app_ibrt_send_keyboard_request(uint8_t *p_buff, uint16_t length)
{
if (app_tws_ibrt_slave_ibrt_link_connected())//判断TWS是否连接
{
app_ibrt_send_cmd_without_rsp(APP_TWS_CMD_KEYBOARD_REQUEST, p_buff, length);//发送消息给对耳
}
}
二.接收并处理对耳的按键消息
void app_ibrt_keyboard_request_handler(uint16_t rsp_seq, uint8_t *p_buff, uint16_t length)