Browse Source

Use proper i2c port on OrangePI

OrangePI uses /dev/i2c-0, handle this correctly

Signed-off-by: Pavel Fedin <pavel_Fedin@mail.ru>
pull/19/head
Pavel Fedin 5 years ago
parent
commit
1d50a1978d
  1. 2
      wiringPi/wiringPiI2C.c

2
wiringPi/wiringPiI2C.c

@ -224,7 +224,7 @@ int wiringPiI2CSetup (const int devId)
rev = piGpioLayout () ;
if (rev == 1)
if (rev == 1 || rev == ORANGEPI)
device = "/dev/i2c-0" ;
else
device = "/dev/i2c-1" ;

Loading…
Cancel
Save