Thanks for great and straightforward library to interface with the mcp23017.
--- lib.rs.old 2022-01-09 13:04:33.000000000 -0600
+++ lib.rs 2022-01-09 13:04:25.000000000 -0600
@@ -148,7 +148,7 @@
/// Reads all 16 pins (port A and B) into a single 16 bit variable.
pub fn read_gpioab(&mut self) -> Result<u16, E> {
let buffer = self.read_double_register(Register::GPIOA)?;
- Ok((buffer[0] as u16) << 8 | (buffer[1] as u16))
+ Ok((buffer[1] as u16) << 8 | (buffer[0] as u16))
}
/// Reads a single port, A or B, and returns its current 8 bit value.
However, if someone was relying on it, it would be a breaking change.