]> git.feebdaed.xyz Git - 0xmirror/WiringPi.git/commitdiff
#227
authormstroh76 <m.stroh76@gmail.com>
Fri, 3 May 2024 12:36:09 +0000 (14:36 +0200)
committermstroh76 <m.stroh76@gmail.com>
Fri, 3 May 2024 12:36:09 +0000 (14:36 +0200)
gpio/gpio.c
wiringPi/wiringPi.c
wiringPi/wiringPi.h

index 0e495600df088a72ce0219eea0f178442906e296..fae1b79159d505216239f5d8671fe3a01123768e 100644 (file)
@@ -1138,7 +1138,7 @@ static void doVersion (char *argv [])
         printf ("  * root or sudo may be required for direct GPIO access.\n") ;
     }
   }
-  if (GetChipFd()>0) {
+  if (wiringPiGpioDeviceGetFd()>0) {
     printf ("  * Supports basic user-level GPIO access via /dev/gpiochip (slow).\n") ;
   }
 
index 1d802bd825c4c0427fdd9323f9cc48536ceb6a67..7d7b5039c39b11ce3a79781cd40d945b4f4edf76 100644 (file)
@@ -1503,7 +1503,7 @@ void pinEnableED01Pi (int pin)
 const char DEV_GPIO_PI[] ="/dev/gpiochip0";
 const char DEV_GPIO_PI5[]="/dev/gpiochip4";
 
-int GetChipFd() {
+int wiringPiGpioDeviceGetFd() {
   if (chipFd<0) {
     piBoard();
     const char* gpiochip = PI_MODEL_5 == RaspberryPiModel ? DEV_GPIO_PI5 : DEV_GPIO_PI;
@@ -1540,7 +1540,7 @@ int requestLine(int pin, unsigned int lineRequestFlags) {
   }
 
   //requested line
-  if (GetChipFd()<0) {
+  if (wiringPiGpioDeviceGetFd()<0) {
     return -1;  // error
   }
   rq.lineoffsets[0] = pin;
@@ -2338,7 +2338,7 @@ int waitForInterruptInit (int pin, int mode)
 
   /* open gpio */
   sleep(1);
-  if (GetChipFd()<0) {
+  if (wiringPiGpioDeviceGetFd()<0) {
     return -1;
   }
 
@@ -3052,7 +3052,7 @@ int wiringPiSetupGpioDevice (enum WPIPinType pinType) {
   if (getenv (ENV_CODES) != NULL)
     wiringPiReturnCodes = TRUE ;
 
-  if (GetChipFd()<0) {
+  if (wiringPiGpioDeviceGetFd()<0) {
     return -1;
   }
   wiringPiSetuped = TRUE ;
index f90b5821076f6f1ff81ad246f2407b5e038b65a8..9bd749f6a6d7dfd87bf7f6cc79bb17fd6f32684c 100644 (file)
@@ -216,7 +216,7 @@ enum WPIPinType {
 };
 
 extern void wiringPiVersion    (int *major, int *minor) ;
-extern int  wiringPiGlobalMemoryAccess(void);             //Interface V3.3
+extern int  wiringPiGlobalMemoryAccess(void);                 //Interface V3.3
 extern int  wiringPiUserLevelAccess (void) ;
 extern int  wiringPiSetup       (void) ;
 extern int  wiringPiSetupSys    (void) ;
@@ -225,7 +225,7 @@ extern int  wiringPiSetupPhys   (void) ;
 extern int  wiringPiSetupPinType (enum WPIPinType pinType);   //Interface V3.3
 extern int  wiringPiSetupGpioDevice(enum WPIPinType pinType); //Interface V3.3
 
-extern          int  GetChipFd           ();
+extern          int  wiringPiGpioDeviceGetFd();               //Interface V3.3
 extern          void pinModeAlt          (int pin, int mode) ;
 extern          void pinMode             (int pin, int mode) ;
 extern          void pullUpDnControl     (int pin, int pud) ;