From ec5f99bceba521a66068577080d60d6707d9076f Mon Sep 17 00:00:00 2001 From: leeboby Date: Thu, 25 Mar 2021 20:25:51 +0800 Subject: [PATCH] Fixed compilation issues --- wiringPi/OrangePi.c | 2 ++ wiringPi/OrangePi.h | 2 ++ wiringPi/wiringPi.c | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wiringPi/OrangePi.c b/wiringPi/OrangePi.c index b8c3dfc..8fd29b5 100755 --- a/wiringPi/OrangePi.c +++ b/wiringPi/OrangePi.c @@ -1996,6 +1996,7 @@ int OrangePi_set_gpio_mode(int pin, int mode) return 0; } +#if !(defined CONFIG_ORANGEPI_RK3399 || defined CONFIG_ORANGEPI_4 || defined CONFIG_ORANGEPI_R1PLUS || CONFIG_ORANGEPI_2G_IOT) int OrangePi_set_gpio_alt(int pin, int mode) { unsigned int regval = 0; @@ -2023,6 +2024,7 @@ int OrangePi_set_gpio_alt(int pin, int mode) return 0; } +#endif /* * OrangePi Digital write diff --git a/wiringPi/OrangePi.h b/wiringPi/OrangePi.h index 31318a2..c37df30 100755 --- a/wiringPi/OrangePi.h +++ b/wiringPi/OrangePi.h @@ -233,7 +233,9 @@ extern int pwmmode; extern unsigned int readR(unsigned int addr); extern void writeR(unsigned int val, unsigned int addr); extern int OrangePi_set_gpio_mode(int pin, int mode); +#if !(defined CONFIG_ORANGEPI_RK3399 || defined CONFIG_ORANGEPI_4 || defined CONFIG_ORANGEPI_R1PLUS || CONFIG_ORANGEPI_2G_IOT) extern int OrangePi_set_gpio_alt(int pin, int mode); +#endif extern int OrangePi_get_gpio_mode(int pin); extern int isOrangePi_2G_IOT(void); extern int isOrangePi(void); diff --git a/wiringPi/wiringPi.c b/wiringPi/wiringPi.c index 88ad1bc..e2de171 100755 --- a/wiringPi/wiringPi.c +++ b/wiringPi/wiringPi.c @@ -1340,6 +1340,7 @@ void pinModeAlt (int pin, int mode) #ifdef CONFIG_ORANGEPI +#if !(defined CONFIG_ORANGEPI_RK3399 || defined CONFIG_ORANGEPI_4 || defined CONFIG_ORANGEPI_R1PLUS || CONFIG_ORANGEPI_2G_IOT) if(version == ORANGEPI) { if (wiringPiDebug) printf("PinModeAlt: pin:%d,mode:%d\n", pin, mode); @@ -1371,7 +1372,7 @@ void pinModeAlt (int pin, int mode) } } #endif - +#endif if ((pin & PI_GPIO_MASK) == 0) // On-board pin { /**/ if (wiringPiMode == WPI_MODE_PINS)