cryptoauthlib
cryptoauthlib copied to clipboard
hal: zephyr: fix device / word address issues with i2c writes
Please describe the purpose of this pull request
Fixes use of word address as device address in i2c writes.
Signed-off-by: Daniel Mangum [email protected]
Some callers pass a word address, but empty data buffer, when issuing i2c writes, such as when waking a device. Typically the HAL is passed a data buffer that includes the word address as the first byte, but when the data buffer is empty we opt to instead use the 1 byte word address as the data to be written.
Signed-off-by: Daniel Mangum [email protected]
Checklist
- [x] I have reviewed the CONTRIBUTING.md and agree to it's terms