使用文件IO操作GPIO引脚之花式点灯(/sys/class/gpio)
寄存器点灯、函数点灯、驱动点灯都写过,但是还没有接触这种方式,因此想将其记录下来,首先编写gpio相关函数:头文件就不写了,gpio.c内容如下:#include <stdint.h>#include <stdbool.h>#include <unistd.h>#include <sys/ioctl.h>#include <poll.h>#include <stdio.h>#include <sys/stat.h&
原创
2022-04-20 17:41:34 ·
562 阅读 ·
0 评论