Grove driver, I2C migrations, bugfixes and docs (#532)
This commit is contained in:
committed by
GitHub
parent
8dabda2b5b
commit
a35c88c8fd
@@ -4,6 +4,7 @@
|
||||
#include "devices/CardputerPower.h"
|
||||
#include <driver/gpio.h>
|
||||
|
||||
#include <tactility/device.h>
|
||||
#include <Tactility/hal/Configuration.h>
|
||||
|
||||
#include <PwmBacklight.h>
|
||||
@@ -16,7 +17,7 @@ static bool initBoot() {
|
||||
}
|
||||
|
||||
static DeviceVector createDevices() {
|
||||
auto tca8418 = std::make_shared<Tca8418>(I2C_NUM_0);
|
||||
auto tca8418 = std::make_shared<Tca8418>(device_find_by_name("i2c_internal"));
|
||||
return {
|
||||
createSdCard(),
|
||||
createDisplay(),
|
||||
|
||||
@@ -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