summaryrefslogtreecommitdiff
path: root/examples/device/audio_test
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2025-04-18 11:13:15 +0200
committerHiFiPhile <[email protected]>2025-04-18 11:13:15 +0200
commitb6abc9022a4beae98cc206d8fbeefb4700deef2f (patch)
treebdd12bb710caa9d161edc1488a37911de0931a3d /examples/device/audio_test
parent713410997326269b4072dce906933f8f44fd0efe (diff)
parent865e3488f99209c57b73953428dccf2bc666f0be (diff)
Merge remote-tracking branch 'upstream/master' into hcd-template-comments
Signed-off-by: HiFiPhile <[email protected]>
Diffstat (limited to 'examples/device/audio_test')
-rw-r--r--examples/device/audio_test/CMakeLists.txt2
-rw-r--r--examples/device/audio_test/CMakePresets.json6
-rw-r--r--examples/device/audio_test/src/main.c6
-rwxr-xr-x[-rw-r--r--]examples/device/audio_test/src/plot_audio_samples.py1
4 files changed, 13 insertions, 2 deletions
diff --git a/examples/device/audio_test/CMakeLists.txt b/examples/device/audio_test/CMakeLists.txt
index f61e1b640..6a7e68c3d 100644
--- a/examples/device/audio_test/CMakeLists.txt
+++ b/examples/device/audio_test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/device/audio_test/CMakePresets.json b/examples/device/audio_test/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/device/audio_test/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/device/audio_test/src/main.c b/examples/device/audio_test/src/main.c
index f79bb4468..018c48994 100644
--- a/examples/device/audio_test/src/main.c
+++ b/examples/device/audio_test/src/main.c
@@ -79,7 +79,11 @@ int main(void)
board_init();
// init device stack on configured roothub port
- tud_init(BOARD_TUD_RHPORT);
+ tusb_rhport_init_t dev_init = {
+ .role = TUSB_ROLE_DEVICE,
+ .speed = TUSB_SPEED_AUTO
+ };
+ tusb_init(BOARD_TUD_RHPORT, &dev_init);
if (board_init_after_tusb) {
board_init_after_tusb();
diff --git a/examples/device/audio_test/src/plot_audio_samples.py b/examples/device/audio_test/src/plot_audio_samples.py
index 1504684a6..ea6aa661e 100644..100755
--- a/examples/device/audio_test/src/plot_audio_samples.py
+++ b/examples/device/audio_test/src/plot_audio_samples.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
import sounddevice as sd
import matplotlib.pyplot as plt
import numpy as np