summaryrefslogtreecommitdiff
path: root/main/gpio-expander.cpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2022-09-28 15:34:00 +1000
committerjacqueline <me@jacqueline.id.au>2022-09-28 15:34:00 +1000
commit112a43679f988a4d4c40ecfbece6d78168c5938e (patch)
treebe914ab34067deb5a38ae94c33f6becd3aebb50f /main/gpio-expander.cpp
parent5d8531642c9164b418cd020d1ad69f128d3b6dc6 (diff)
downloadtangara-fw-112a43679f988a4d4c40ecfbece6d78168c5938e.tar.gz
iterate on gpio expander bit flipping
Diffstat (limited to 'main/gpio-expander.cpp')
-rw-r--r--main/gpio-expander.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/gpio-expander.cpp b/main/gpio-expander.cpp
index 2ed9c11f..36132356 100644
--- a/main/gpio-expander.cpp
+++ b/main/gpio-expander.cpp
@@ -38,8 +38,8 @@ esp_err_t GpioExpander::Read() {
// it because that would indicate some really very badly wrong more generally.
i2c_master_start(handle);
i2c_master_write_byte(handle, (PCA8575_ADDRESS << 1 | I2C_MASTER_READ), true);
- i2c_master_read_byte(handle, &input_a_, I2C_MASTER_ACK);
- i2c_master_read_byte(handle, &input_b_, I2C_MASTER_LAST_NACK);
+ i2c_master_read_byte(handle, &port_a_, I2C_MASTER_ACK);
+ i2c_master_read_byte(handle, &port_b_, I2C_MASTER_LAST_NACK);
i2c_master_stop(handle);
esp_err_t ret = i2c_master_cmd_begin(I2C_NUM_0, handle, PCA8575_TIMEOUT);