From e9b3143a7ba147663a91ac43a064d37571d54a5e Mon Sep 17 00:00:00 2001 From: zhaohe Date: Fri, 3 Mar 2023 18:33:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0zlinuxcomponents?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 2 +- dep/zlinuxcomponents | 2 +- env/speaker_control.sh | 12 ++++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 env/speaker_control.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 42f4a81..56c98db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,4 +83,4 @@ zadd_executable_simple( zadd_executable_simple(TARGET alsaplayer_main.out SRC dep/zlinuxcomponents/alsaplayer/alsaplayer_main.cpp) zadd_executable_simple(TARGET audio_recorder_main.out SRC - dep/zlinuxcomponents/audio/audio_recorder_main.cpp) + dep/zlinuxcomponents/audio/audio_recorder_main.cpp) \ No newline at end of file diff --git a/dep/zlinuxcomponents b/dep/zlinuxcomponents index 967e379..4709e45 160000 --- a/dep/zlinuxcomponents +++ b/dep/zlinuxcomponents @@ -1 +1 @@ -Subproject commit 967e3791e74c91cb0016526ae412658eac841654 +Subproject commit 4709e454d71e4656d92f2badcd17ddb5de668265 diff --git a/env/speaker_control.sh b/env/speaker_control.sh new file mode 100644 index 0000000..22f0a09 --- /dev/null +++ b/env/speaker_control.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +# 引脚编号:GPIO2-A3 +# Linux中对应的编号: 32*2 + (A-A)*8 + 3 = GPIO67 +# + + +# 配置GPIO1_D4 +echo 60 > /sys/class/gpio/export +echo out > /sys/class/gpio/gpio60/direction +echo 1 > /sys/class/gpio/gpio60/value +