esp_adf 历程pipeline_a2dp_sink_and_hfp无法切歌以及播放暂定
Posted: Thu Jul 29, 2021 1:33 am
Code: Select all
if ((msg.source_type == PERIPH_ID_TOUCH || msg.source_type == PERIPH_ID_BUTTON || msg.source_type == PERIPH_ID_ADC_BTN)
&& (msg.cmd == PERIPH_TOUCH_TAP || msg.cmd == PERIPH_BUTTON_PRESSED || msg.cmd == PERIPH_ADC_BUTTON_PRESSED)) {
if ((int) msg.data == get_input_play_id()) {
ESP_LOGI(TAG, "[ * ] [Play] touch tap event");
periph_bluetooth_play(bt_periph);
} else if ((int) msg.data == get_input_set_id()) {
ESP_LOGI(TAG, "[ * ] [Set] touch tap event");
periph_bluetooth_pause(bt_periph);
} else if ((int) msg.data == get_input_volup_id()) {
ESP_LOGI(TAG, "[ * ] [Vol+] touch tap event");
periph_bluetooth_next(bt_periph);
} else if ((int) msg.data == get_input_voldown_id()) {
ESP_LOGI(TAG, "[ * ] [Vol-] touch tap event");
periph_bluetooth_prev(bt_periph);
}
}