当前位置:网站首页>Rk3308 key and LED light
Rk3308 key and LED light
2022-06-10 15:59:00 【Cat teacher NIA~】
Hardware schematic diagram
LED Indicator light
Used on the microphone array daughter board 12 star RGB Light as effect indicator . The user can go through I2C Bus configuration LED Lamp drive IC To realize the lighting effect in different scenes .

Key Key

Five control keys are integrated into the microphone array daughter board , Respectively : To control the volume increase or decrease VOL- and VOL+、 prohibit MIC Recorded
MIC_MUTE、 Switch device mode MODE、 Control the device to play or pause Play/Pause
POWER Control

GPIOTo chooseGPIO0Of pin, Generally, when the master is asleep ,GPIO0The controller works with electricity , The others are out of power , Can't wake up ( Set interrupt ,linux Under the system , To be in dts Set in )- Sleep (suspend) Refer to , The system freezes the process , Then suspend the power supply of the equipment in turn to stop working , Enter low power mode ; Sleep Command :
echo mem > /sys/power/state - Wake up the (resume) Refer to , Recover from sleep mode to normal working mode .EVB On power The key has a wake-up function , Press down power key , The system will wake up

Configuration on the software
Key Key Configuration of
Related documents :
Rockchip_Developer_Guide_DeviceIo_Key_CN.pdfRockchip_RK3308_Developer_Guide_Linux_Input_CN.pdfY:\hxy\RK3308\sdk-1.5\buildroot\board\rockchip\rk3308\fs-overlay\etc\input-event-daemon.confY:\hxy\RK3308\sdk-1.5\buildroot\output\rockchip_rk3308_release\target\etc\input-event-daemon.conf( Same as above )Y:\hxy\RK3308\sdk-1.5\buildroot\output\rockchip_rk3308_release\build\input-event-daemon-v0.1.3\input-event-daemon.hY:\hxy\RK3308\sdk-1.5\kernel\drivers\input\keyboard\adc-keys.c
Related instructions :
cd work/hxy/RK3308/sdk-1.5cd buildroot/output/rockchip_rk3308_releasemake input-event-daemon-dirclean && make input-event-daemon-rebuildgrep -rwn "Keys" --include "*.conf"(-i: Case insensitive -n: According to the line Numbers -r: Traverse the directory layer by layer to find -w: Search by word --include: Specify matching file types )
customer demand :
- Press the button Mode, Execute the customer's APP, And turn on the blue light
- Press the button MIC_Mute, Close the customer's APP, And the red light is on
- Press the button VOL+, Perform recording gain
Realization way : use input-event-daemon+shell Script implementation
buildroot Compile configuration
1. Source path :Y:\hxy\RK3308\sdk-1.5\buildroot\output\rockchip_rk3308_release\build\input-event-daemon-v0.1.3
2. Code directory description :
input-event-daemon.cMonitor kernel event event , Then respond to the corresponding event according to the configuration filetarget\etc\input-event-daemon.confKey event settings
3.buildroot Add the corresponding compilation configuration :
- #
cd buildroot/output/rockchip_rk3308_release - #
make menuconfig - choice
Target packages->Hardware handling->input-event-daemon - #
make input-event-daemon-dirclean && make input-event-daemon-rebuild - #
./build.sh
Yes conf File configuration and writing shell Script
input-event-daemon.conf The file configuration is as follows (Keys Your name is not written casually , Yes. input-event-table.h Configured in ):
Linux in && and &,| and ||
[Global]
listen = /dev/input/event0
listen = /dev/input/event1
#listen = /dev/input/event2
#listen = /dev/input/event3
[Keys]
MODE = ./data/LedTest 2&&echo 1 > /sys/class/leds/led33/brightness&&echo 0 > /sys/class/leds/led14/brightness&&source /data/openAPP.sh
PLAY = echo "-----Press PLAY-----"
MUTE = ./data/LedTest 2&&echo 0 > /sys/class/leds/led33/brightness&&echo 1 > /sys/class/leds/led14/brightness&&source /data/closeAPP.sh
VOLUMEDOWN = export ALSA_LIB_ADD_GAIN=2
VOLUMEUP = ./data/LedTest 2&&export ALSA_LIB_ADD_GAIN=4&&echo 1 > /sys/class/leds/led4/brightness
#PLAY = source /data/closeAPP.sh
#MUTE = echo "-----Press MUTE-----"
#POWER = echo mem > /sys/power/state
#MUTE = amixer -q set Master mute
#FN+VOLUMEUP = factory_reset_cfg
#CTRL+ALT+ESC = beep
#FN = softapServer Rockchip-Echo-123 &
[Switches]
RADIO:0 = ifconfig wlan0 down
[Idle]
1h 30m = vbetool dpms off
reset = vbetool dpms on
There are... On the small board 12 individual LED The lamp , From the triangle marked LED Start , according to green 、 red 、 blue The order of ( Corresponding led1、led2、led3 ) Sort
openAPP.sh The configuration is as follows :( Be careful not to end with Enter Key end , Otherwise, it will report a mistake )
#!/bin/sh
echo "open APP"
./data/rk_hw_vad
closeAPP.sh The configuration is as follows :
#!/bin/sh
echo "close APP"
kill -9 $(pidof rk_hw_vad)
LED Lamp configuration
echo 1 > /sys/class/leds/led33/brightness Turn on the blue light ( Changing the number size can adjust the brightness 0~255)
echo 0 > /sys/class/leds/led14/brightness Put out the red light
echo 1 > /sys/class/leds/led4/brightness Turn on the green light
Program yourself demo To write
LED_Demo To write
边栏推荐
- 【第六节 函数】
- 【无标题】
- 排名前十、手续费低的期货公司有哪些?安全吗
- Click to unlock "keyword" of guanghetong 5g module
- Guanghetong cooperates with China Mobile, HP, MediaTek and Intel to build 5g fully connected PC pan terminal products
- 【对象】。
- 安霸CV2FS/CV22FS获得ASIL C芯片功能安全认证,超越市场同类芯片水平
- What has guanghetong done in the three years of 5g business from "seeding in the first generation" to "flower on the ground"?
- "Bloom Cup" 5g Application Award grand slam! Several joint projects of guanghetong won the first, second and third prizes in the general product theme competition
- MapReduce之分区案例的代码实现
猜你喜欢
![[untitled] audio Bluetooth voice chip, wt2605c-32n real-time recording upload technical scheme introduction](/img/13/9674d685dfa0b62d1d1fa5362a4c7e.png)
[untitled] audio Bluetooth voice chip, wt2605c-32n real-time recording upload technical scheme introduction

Scope and closure

“绽放杯”5G应用奖项大满贯!广和通多个联合项目荣获通用产品专题赛一、二、三等奖

Common QR decomposition, SVD decomposition and other matrix decomposition methods of visual slam to solve full rank and deficient rank least squares problems (analysis and summary of the most complete

What has guanghetong done in the three years of 5g business from "seeding in the first generation" to "flower on the ground"?

uniapp中常用到的方法(部分) - 時間戳問題及富文本解析圖片問題

TensorFlow实战Google深度学习框架第二版学习总结-TensorFlow入门

Vins theory and code explanation 0 -- theoretical basis in vernacular

Live broadcast preview | deconstruct OLAP! The new multidimensional analysis architecture paradigm is fully open! Apache Doris will bring five big issues!

企业如何提升文档管理水平
随机推荐
Solution to some problems of shadow knife RPA learning and meeting Excel
【无标题】
百度开源ICE-BA安装运行总结
Baidu open source ice-ba installation and operation summary
无线通信模组如何助力智能无人机打造“空中物联网”?
torch.utils.data.DataLoader()详解【Pytorch入门手册】
运行mapreduce任务缺失setJarByClass()报错找不到类
Vins theory and code explanation 4 - initialization
[object].
苹果式中文:似乎表达清楚意思了,懂了没完全懂的苹果式宣传文案
[sans titre]
RK3308 按键Key与LED灯
Digital management medium + low code, jnpf opens a new engine for enterprise digital transformation
广和通高算力智能模组为万亿级市场5G C-V2X注智
QT interface nested movement based on qscrollarea
This and object prototypes
Méthodes couramment utilisées dans uniapp - TIMESTAMP et Rich Text Analysis picture
姿态估计之2D人体姿态估计 - Distribution Aware Coordinate Representation for Human Pose Estimation【转-修改】
uniapp中常用到的方法(部分) - 时间戳问题及富文本解析图片问题
Fast detection of short text repetition rate