Improve I2C locking and implement I2C for TactilityC (#147)

I2C:
- Lock timeout set to reasonable times
- Check lock status in all functions
- Refactor lock/unlock to return `bool` values
- Implement functions in TactilityC
Other:
- Updated screenshots
This commit is contained in:
Ken Van Hoeylandt
2025-01-03 23:39:23 +01:00
committed by GitHub
parent a9e890a7f3
commit 7187e5e49e
13 changed files with 207 additions and 74 deletions
@@ -59,7 +59,7 @@ bool TdeckKeyboard::stop() {
}
bool TdeckKeyboard::isAttached() const {
return tt::hal::i2c::masterCheckAddressForDevice(TDECK_KEYBOARD_I2C_BUS_HANDLE, TDECK_KEYBOARD_SLAVE_ADDRESS, 100);
return tt::hal::i2c::masterHasDeviceAtAddress(TDECK_KEYBOARD_I2C_BUS_HANDLE, TDECK_KEYBOARD_SLAVE_ADDRESS, 100);
}
tt::hal::Keyboard* createKeyboard() {