mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
- Create real drivers instead of wrapping M5Unified/M5GFX - Display HAL improvements (better default base class behaviour) - Fixed bug with LVGL statusbar service locking (would hang indefinitely waiting for mutex, causing WDT issues) - Fixes for `Critical.h` - Fixes and improvements for `Dispatcher` and `DispatcherThread`
53 lines
1.7 KiB
C++
53 lines
1.7 KiB
C++
#include "M5stackCore2.h"
|
|
#include "InitBoot.h"
|
|
#include "InitLvgl.h"
|
|
#include "hal/Core2Display.h"
|
|
#include "hal/Core2SdCard.h"
|
|
#include "hal/Core2Power.h"
|
|
|
|
extern const tt::hal::Configuration m5stack_core2 = {
|
|
.initBoot = initBoot,
|
|
.initLvgl = initLvgl,
|
|
.createDisplay = createDisplay,
|
|
.sdcard = createSdCard(),
|
|
.power = createPower,
|
|
.i2c = {
|
|
tt::hal::i2c::Configuration {
|
|
.name = "Internal",
|
|
.port = I2C_NUM_0,
|
|
.initMode = tt::hal::i2c::InitByTactility,
|
|
.canReinit = false, // Might be set to try after trying out what it does AXP and screen
|
|
.hasMutableConfiguration = false,
|
|
.config = (i2c_config_t) {
|
|
.mode = I2C_MODE_MASTER,
|
|
.sda_io_num = GPIO_NUM_21,
|
|
.scl_io_num = GPIO_NUM_22,
|
|
.sda_pullup_en = true,
|
|
.scl_pullup_en = true,
|
|
.master = {
|
|
.clk_speed = 400000
|
|
},
|
|
.clk_flags = 0
|
|
}
|
|
},
|
|
tt::hal::i2c::Configuration {
|
|
.name = "External", // (Grove)
|
|
.port = I2C_NUM_1,
|
|
.initMode = tt::hal::i2c::InitByTactility,
|
|
.canReinit = true,
|
|
.hasMutableConfiguration = true,
|
|
.config = (i2c_config_t) {
|
|
.mode = I2C_MODE_MASTER,
|
|
.sda_io_num = GPIO_NUM_32,
|
|
.scl_io_num = GPIO_NUM_33,
|
|
.sda_pullup_en = true,
|
|
.scl_pullup_en = true,
|
|
.master = {
|
|
.clk_speed = 400000
|
|
},
|
|
.clk_flags = 0
|
|
}
|
|
}
|
|
}
|
|
};
|