From 1d50a1978da67f0aef71ea0dbc0f4029aced9320 Mon Sep 17 00:00:00 2001 From: Pavel Fedin Date: Sat, 2 May 2020 21:55:30 +0000 Subject: [PATCH] Use proper i2c port on OrangePI OrangePI uses /dev/i2c-0, handle this correctly Signed-off-by: Pavel Fedin --- wiringPi/wiringPiI2C.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiringPi/wiringPiI2C.c b/wiringPi/wiringPiI2C.c index b0ee5d3..f0ae842 100644 --- a/wiringPi/wiringPiI2C.c +++ b/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" ;