⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shutdown.c

📁 基于linux和s3c2440的gpio驱动程序
💻 C
字号:
//written by bcng xiyong,2007-7-1//set gpj4 to zero to give a kill signal to chip ltc2950#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <stdio.h>#include <termios.h>#include <unistd.h>#define GPJCON 0x560000d0#define GPJ4 0x4int main( ){   int fd;   unsigned long  p[2];   fd=open("/dev/gpio",O_RDWR | O_NOCTTY);   if (fd < 0)        {                printf("can not open gpio!\n");		return -1;        }   p[0]=GPJCON;  //GPJCON   p[1]=GPJ4;   write(fd,p,0x0);	      close(fd);} 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -