unPhone implementation and more (#169)
- Implemented [unPhone](https://unphone.net/) v9 board - Updated `.clang-format` to better reflect the intended code style - Fix SD card compatibility issues for all boards (frequency wasn't set well) - Moved `I2cDevice` class from CoreS3 board project to TactilityHeadless project - Tactility configuration now has default empty lists for apps and services fields - Fix for Launcher app: we don't need padding when showing it vertically - Fix for I2cDevice read/write calls that checked for `esp_err_t` instead of `bool` - Fix for TinyUSB init that checked for `esp_err_t` instead of `bool`
This commit is contained in:
committed by
GitHub
parent
3ea02d912f
commit
72230129bb
@@ -0,0 +1,57 @@
|
||||
#include "UnPhoneFeatures.h"
|
||||
#include "hal/Configuration.h"
|
||||
#include "hal/UnPhoneDisplay.h"
|
||||
#include "hal/UnPhoneSdCard.h"
|
||||
|
||||
bool unPhoneInitPower();
|
||||
bool unPhoneInitHardware();
|
||||
bool unPhoneInitLvgl();
|
||||
|
||||
// Shared object, used in PowerOn and UnPhoneDisplay
|
||||
UnPhoneFeatures unPhoneFeatures;
|
||||
|
||||
extern const tt::hal::Configuration unPhone = {
|
||||
.initBoot = unPhoneInitPower,
|
||||
.initHardware = unPhoneInitHardware,
|
||||
.initLvgl = unPhoneInitLvgl,
|
||||
.createDisplay = createDisplay,
|
||||
.sdcard = createUnPhoneSdCard(),
|
||||
.i2c = {
|
||||
tt::hal::i2c::Configuration {
|
||||
.name = "Internal",
|
||||
.port = I2C_NUM_0,
|
||||
.initMode = tt::hal::i2c::InitMode::ByTactility,
|
||||
.canReinit = false,
|
||||
.hasMutableConfiguration = false,
|
||||
.config = (i2c_config_t) {
|
||||
.mode = I2C_MODE_MASTER,
|
||||
.sda_io_num = GPIO_NUM_3,
|
||||
.scl_io_num = GPIO_NUM_4,
|
||||
.sda_pullup_en = true,
|
||||
.scl_pullup_en = true,
|
||||
.master = {
|
||||
.clk_speed = 400000
|
||||
},
|
||||
.clk_flags = 0
|
||||
}
|
||||
},
|
||||
tt::hal::i2c::Configuration {
|
||||
.name = "Unused",
|
||||
.port = I2C_NUM_1,
|
||||
.initMode = tt::hal::i2c::InitMode::Disabled,
|
||||
.canReinit = true,
|
||||
.hasMutableConfiguration = true,
|
||||
.config = (i2c_config_t) {
|
||||
.mode = I2C_MODE_MASTER,
|
||||
.sda_io_num = GPIO_NUM_NC,
|
||||
.scl_io_num = GPIO_NUM_NC,
|
||||
.sda_pullup_en = false,
|
||||
.scl_pullup_en = false,
|
||||
.master = {
|
||||
.clk_speed = 400000
|
||||
},
|
||||
.clk_flags = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user