基于am3358的led跑马灯测试
2015-06-10 11:03
218 查看
#include <sys/ioctl.h> #include<stdio.h> #include <fcntl.h> #include <sys/types.h> static int fb; int main() { int i=0; printf("hello world !\n"); fb = open("/dev/led", O_RDWR);//打开设备 if (fb < 0) { perror("open device leds fail"); } for(i=0;i<100;i++) { ioctl(fb, 1, i%4+1); usleep(200000); ioctl(fb, 0, i%4+1); } // close(fb); return 0; }
相关文章推荐
- 基于am3358的led跑马灯测试 分类: TI-AM335X 2015-06-10 11:03 239人阅读 评论(0) 收藏
- 带箭头的曲线(自定义的贝塞尔曲线和首次启动 app的引导界面)
- mysql的授权问题
- jquery获取当前元素索引值用法实例
- linux mv命令
- 安卓编译系统简介
- DVWA安装
- Step into Gradle - 06 - 文件管理
- 微信生成二维码
- BZOJ 3203 Sdoi2013 保护出题人 凸包+三分
- 鼠标移到元素上显示提示信息
- GridView的标准写法
- WPF 颜色
- shell学习第七天----基础正则表达式(BRE)
- cocoStudio: button触摸事件响应
- C++构造函数为什么不能是虚函数
- 企业证书APP发布流程
- android底层开发系列helloworld
- 一步一步学linux多线程编程
- hbase