From 2922367bc8df244fa2e1b967108d0ea6ba9e3d26 Mon Sep 17 00:00:00 2001 From: Vincent-FK Date: Mon, 15 Mar 2021 23:25:44 +0100 Subject: [PATCH] bug correction when Probing PCAL9539A chip --- driver_pcal6416a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver_pcal6416a.c b/driver_pcal6416a.c index 8c783ec..3d7923e 100755 --- a/driver_pcal6416a.c +++ b/driver_pcal6416a.c @@ -50,7 +50,7 @@ bool pcal6416a_init(void) { i2c_expander_addr = 0; /// Probing PCAL9539A chip - if (ioctl(!i2c_expander_addr && fd_i2c_expander, I2C_SLAVE_FORCE, PCAL9539A_I2C_ADDR) < 0) { + if (!i2c_expander_addr && ioctl(fd_i2c_expander, I2C_SLAVE_FORCE, PCAL9539A_I2C_ADDR) < 0) { printf("In %s - Failed to acquire bus access and/or talk to slave PCAL9539A_I2C_ADDR 0x%02X.\n", __func__, PCAL9539A_I2C_ADDR); }