Browse Source

Fixed compilation issues

pull/39/head
leeboby 4 years ago
parent
commit
ec5f99bceb
  1. 2
      wiringPi/OrangePi.c
  2. 2
      wiringPi/OrangePi.h
  3. 3
      wiringPi/wiringPi.c

2
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

2
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);

3
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)

Loading…
Cancel
Save