wiringPi: Refactor source codes

Change-Id: Id121bfc6cb211b78b7ade56d235d43bdf11fc690
This commit is contained in:
Joshua Yang
2018-11-28 16:54:34 +09:00
committed by joshua-yang
parent 175d1f6af0
commit c3752077c6
19 changed files with 180 additions and 2862 deletions

View File

@@ -33,7 +33,6 @@
#include <wiringPi.h>
/*----------------------------------------------------------------------------*/
#include <wiringOdroid.h>
extern int wpMode ;
@@ -277,9 +276,9 @@ static void readallPhysOdroid (int model, int rev, int physPin, const char *phys
if ((physToWpi [physPin] == -1) || (physPinToGpio (physPin) == -1))
printf (" | | ") ;
else {
if (wpMode == WPI_MODE_GPIO)
if (wpMode == MODE_GPIO)
pin = physPinToGpio (physPin);
else if (wpMode == WPI_MODE_PHYS)
else if (wpMode == MODE_PHYS)
pin = physPin ;
else
pin = physToWpi [physPin];
@@ -297,9 +296,9 @@ static void readallPhysOdroid (int model, int rev, int physPin, const char *phys
if ((physToWpi [physPin] == -1) || (physPinToGpio (physPin) == -1))
printf (" | | ") ;
else {
if (wpMode == WPI_MODE_GPIO)
if (wpMode == MODE_GPIO)
pin = physPinToGpio (physPin);
else if (wpMode == WPI_MODE_PHYS)
else if (wpMode == MODE_PHYS)
pin = physPin ;
else
pin = physToWpi [physPin];