当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- DCL单例模式中的缺陷及单例模式的其他实现
- 容器技术(三)搭建本地 Registry【15】
- Day83: Luffy: add shopping cart & navigation bar shopping cart digital display & shopping cart page display
- Chrome扩展程序热更新方案:2.基于双缓存更新功能模块
- JS深拷贝
- Git + -- Code hosting in the history of version management
- 浅谈API网关(API Gateway)如何承载API经济生态链
- 手势切换背景,让直播带货更加身临其境
- What is the essence of cloud database? Explore the core value of Huawei cloud database
- PHP - cURL复制粘贴性接入短信验证码示例
猜你喜欢

The database executes truncate table cm_ CHECK_ ITEM_ How does his recover

都要2021年了,现代C++有什么值得我们学习的?

你了解你的服务器吗、你知道服务器的有哪些内幕吗

第三阶段 Day19 用户回显 封装Cookie 商品远程调用 购物车模块 CRUD操作
![[best practice] learn how eolinker helps Telecommuting](/img/7b/e786e0d73114e6c6800747580aad2d.jpg)
[best practice] learn how eolinker helps Telecommuting

说说 C# 9 新特性的实际运用

Another comparison operator related interview question let me understand that the foundation is very important

Android instance - simple login layout

又一道比较运算符相关的面试题让我明白基础很重要

传统采购模式已变!汽车采购职能该如何创新?
随机推荐
云数据库的本质是什么?探究华为云数据库的核心价值
How to use binary search algorithm
Overseas warehouses witness the vigorous development of cross border e-commerce between China and Europe
分库分表的 9种分布式主键ID 生成方案,挺全乎的
andorid实例-简单登录布局
【STM32F429】第6章 ThreadX GUIX上手之STM32F429 DMA2D加速
Configure the NZ date picker time selection component of ng zerro
Activity工作流交互demo简单实现
C console calls ffmpeg to push MP4 video file to stream media open source service platform easydarwin process
DCL单例模式中的缺陷及单例模式的其他实现
修改jar包里的文件
C#控制台调用FFMPEG推MP4视频文件至流媒体开源服务平台EasyDarwin过程
财务管理系统如何帮助企业实现财务自动化管理?
Using powerful powerbi Sangji diagram to express complex operation business flow
In the third stage, day19 users echo packaged cookie products and remotely call Shopping Cart module crud operation
配置ng-zerro的nz-date-picker时间选择组件
[最佳实践]了解 Eolinker 如何助力远程办公
超简单集成华为系统完整性检测,搞定设备安全防护
手把手教你使用容器服务 TKE 集群审计排查问题
Single linked list inversion