📄 test_iic_led.c
字号:
#include <unistd.h>#include <linux/fs.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <stdio.h>#define LED_SLAVE_ADD 0x70int main(){ int fd = open("/dev/led",O_RDWR); //can read and write char null_buf[5]={-1,-1,-1,-1,-1}; if (fd == -1) { perror("can't open device led_board!"); exit(1); } while(1) { write(fd,null_buf,5); sleep(1); } close(fd);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -