基于am3358的led跑马灯测试

#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跑马灯测试

相关文章:

你感兴趣的文章:

标签云: