We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a92d3e commit 6e53673Copy full SHA for 6e53673
src/SparkFun_I2C_Mux_Arduino_Library.cpp
@@ -70,13 +70,14 @@ bool QWIICMUX::setPort(uint8_t portNumber)
70
71
//Returns the first port number bit that is set
72
//Returns 255 if no port is enabled
73
+//Return 254 if there is an I2C error
74
uint8_t QWIICMUX::getPort()
75
{
76
//Read the current mux settings
77
//_i2cPort->beginTransmission(_deviceAddress); <- Don't do this!
78
_i2cPort->requestFrom(_deviceAddress, uint8_t(1));
79
if (!_i2cPort->available())
- return (255); //Error
80
+ return (254); //Error
81
uint8_t portBits = _i2cPort->read();
82
83
//Search for the first set bit, then return its location
0 commit comments