Grove driver, I2C migrations, bugfixes and docs (#532)
This commit is contained in:
committed by
GitHub
parent
8dabda2b5b
commit
a35c88c8fd
@@ -1,10 +1,8 @@
|
||||
#include "CardputerKeyboard.h"
|
||||
#include <Tactility/hal/i2c/I2c.h>
|
||||
#include <tactility/drivers/i2c_controller.h>
|
||||
|
||||
constexpr auto* TAG = "CardputerKeyb";
|
||||
|
||||
constexpr auto BACKLIGHT = GPIO_NUM_46;
|
||||
|
||||
constexpr auto KB_ROWS = 14;
|
||||
constexpr auto KB_COLS = 4;
|
||||
|
||||
@@ -151,5 +149,5 @@ bool CardputerKeyboard::stopLvgl() {
|
||||
}
|
||||
|
||||
bool CardputerKeyboard::isAttached() const {
|
||||
return tt::hal::i2c::masterHasDeviceAtAddress(keypad->getPort(), keypad->getAddress(), 100);
|
||||
return i2c_controller_has_device_at_address(keypad->getController(), keypad->getAddress(), 100) == ERROR_NONE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user