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);
}
}
硬件平台:ESP32-LyraT V4.3 目前可以正常播放音乐,板子touch按键也可以正常触发,但是
手机没有任何反应,不能实现播放与暂定