当前位置:网站首页>Quick for imx6ull development board c program call shell
Quick for imx6ull development board c program call shell
2020-11-09 19:13:00 【Book white】
This chapter is about linux Under system environment linux-C call shell Command control GPIO Input and output steps .shell As Linux The shell of the operating system , Provide users with an interface to use the operating system . It's a command language 、 Command interpreter and programming language , It interprets commands entered by the user and sends them to the kernel .
Use shell The command operates directly /sys/ Under the gpio node , First, in the imx6ull-14x14-evk.dts Comment out the device tree LED And button function ,LED Pin for GPIO0_3,key Pin for GPIO1_18.
Pass in the program shell Command to read key values and control LED The lamp .


1. adopt popen perform shell command
popen and pclose The function is to create a pipeline , Used to connect to another process , Then read the output of that process or send input to it , The specific operation is fork A subprocess ,exec One shell Carry out orders .

2. Fill in shell command , Set pin status

3. control Led

Cross compilation arm-linux-gnueabihf-gcc -o led shellGpio.c , take led Copy the file to the development board .

Test can see that the light of the development board is flashing , The terminal has print information :

4. Read the key value

Post compile testing :

Good product recommendation - Fast for quality IMX6ULL Development board

Terminator information is open source , If you don't buy it, you can download software and hardware resources freely
You just need to focus on VX official account : XunWei Electronics , reply : The terminator , Free access to product information
i.MX6ULL Terminator manual download link
https://pan.baidu.com/s/171NHz6_sVMGIQ3g7GcCqOQ Extraction code :n3og
B Station search ‘ Beijing Xunwei ’, Get started with free video tutorials , Continuous updating .
https://space.bilibili.com/33785640
i.MX6ULL Terminator development board Introduction
https://www.bilibili.com/video/BV1aE411F7S9
i.MX6ULL Terminator development board out of the box experience
https://www.bilibili.com/video/BV1M7411m7wT
Linux-QT The tutorial is free to watch here , Xunwei is the first to provide 6ULL Of QT Video actual combat course , Try the fresh version :
In this issue QT What knowledge will the video harvest ?
https://www.bilibili.com/video/BV1tp4y1i7EJ?p=1
P10 QT Serial port assistant for PC development ( On )
https://www.bilibili.com/video/BV1tp4y1i7EJ?p=10
QT Network programming UDP signal communication
https://www.bilibili.com/video/BV1tp4y1i7EJ?p=14
QT Cross compilation of system transplantation QT Source code and touch source code
https://www.bilibili.com/video/BV1tp4y1i7EJ?p=17
QT Cross platform operation QT Program cross compiled to ARM Development board
https://www.bilibili.com/video/BV1tp4y1i7EJ?p=19
QT The use of cross platform operation QT Control the buzzer
https://www.bilibili.com/video/BV1tp4y1i7EJ?p=20
QT Cross platform operation QT Program compiled into mobile phone APP
https://www.bilibili.com/video/BV1tp4y1i7EJ?p=21
Copy a smart home interface ( On )
https://www.bilibili.com/video/BV1tp4y1i7EJ?p=7
Copy a smart home interface ( Next )
https://www.bilibili.com/video/BV1tp4y1i7EJ?p=9
版权声明
本文为[Book white]所创,转载请带上原文链接,感谢
边栏推荐
- AQS源码深入分析之条件队列
- 【科创人】Rancher江鹏:从清华工程物理学硕士到云计算开源创业者
- Container technology (3) mirror summary [16]
- 磁阻式随机存储器MRAM基本原理
- Experts' interpretation of four hot industries in 2020 China telecom terminal technology and Standards Forum
- 上云嘉年华,超低价云服务器来袭
- How to edit summation formula in MathType
- Super low price cloud server is coming
- mongodb 源码实现系列 - 网络传输层模块实现三
- Gesture switch background, let live with goods more immersive
猜你喜欢

dat.GUI 打造可视化工具(一)

dat.GUI Creating visualization tools (1)

Flink的安装部署
![[God level operation] analyze the Ninja code with the traditional Chinese thoughts of Confucius and Laozi!](/img/79/4a0cc100c0f0b015410cb3b3732690.jpg)
[God level operation] analyze the Ninja code with the traditional Chinese thoughts of Confucius and Laozi!

Visualization construction of CIM platform

手势切换背景,让直播带货更加身临其境

DCL单例模式中的缺陷及单例模式的其他实现

【科创人】Rancher江鹏:从清华工程物理学硕士到云计算开源创业者

JT-day10

配置ng-zerro的nz-date-picker时间选择组件
随机推荐
配置ng-zerro的nz-date-picker时间选择组件
RBAC of kubernetes authority management (1)
Rabbitmq installation
老旧系统重构技巧,轻松搞定遗留代码
Single linked list inversion
超简单集成华为系统完整性检测,搞定设备安全防护
More than 60 technical executives gathered in Songshan Lake, and the first phase of Huawei cloud core partner developer training camp was successfully concluded
【涂鸦物联网足迹】涂鸦云平台接口说明
第三阶段 Day20 购物车模块实现 添加拦截器 添加用户权限校检 实现订单模块
DCL单例模式中的缺陷及单例模式的其他实现
Nine kinds of distributed primary key ID generation schemes of sub database and sub table are quite comprehensive
Mac无法连接到App Store并提示需要连接网络怎么办?
LeetCode 48 旋转图像
超简单集成华为系统完整性检测,搞定设备安全防护
【STM32F429】第6章 ThreadX GUIX上手之STM32F429 DMA2D加速
分享用MathType编辑字母与数学公式的技巧
[stm32h7] Chapter 6: stm32h7 dma2d acceleration of ThreadX guix
Ultra simple integration of Huawei system integrity testing, complete equipment security protection
Git old bird search manual
40 tips for life that may be useful