Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/hal/hal_esp32_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ ATCA_STATUS hal_i2c_send(ATCAIface iface, uint8_t word_address, uint8_t *txdata,
}

(void)i2c_master_bus_rm_device(i2c_hal_data[bus].dev_handle);
i2c_hal_data[bus].dev_handle = NULL;

#endif

Expand Down Expand Up @@ -317,6 +318,7 @@ ATCA_STATUS hal_i2c_receive(ATCAIface iface, uint8_t address, uint8_t *rxdata, u
}

(void)i2c_master_bus_rm_device(i2c_hal_data[bus].dev_handle);
i2c_hal_data[bus].dev_handle = NULL;

#endif

Expand All @@ -341,6 +343,7 @@ ATCA_STATUS hal_i2c_release(void *hal_data)

if (hal->dev_handle) {
rc = i2c_master_bus_rm_device(hal->dev_handle);
hal->dev_handle = NULL;
}

if (hal && --(hal->ref_ct) <= 0)
Expand Down