mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
- Rename `assets` and `config` partitions to `system` and `data` - Change partition type from `spiffs` to `fat`, so we can have sub-directories - Fix crash when doing WiFi scan: Increased system event task size to 3kB. - Free up IRAM on ESP32 (it was required for the Core2, but I also freed up the same amount for Yellow Board) - Introduced `Paths` objects that can be retrieved by `AppContext` and `ServiceContext`. Apps and services now have their own relative paths. Assets were re-arranged into the correct paths. - Rename simulator window title to "Tactility" - Refactored statusbar widget so it persists icon paths properly (it kept a const char* reference, but didn't copy it, so it crashed when the related std::string was destroyed) - Created `Partitions.h` to expose some useful variables - Moved USB config in various `sdkconfig` (it was part of the "default" section, but it shouldn't be) - Updated domain name
29 lines
779 B
C++
29 lines
779 B
C++
#include "hal/Hal_i.h"
|
|
#include "hal/i2c/I2c.h"
|
|
|
|
#define TAG "hal"
|
|
|
|
namespace tt::hal {
|
|
|
|
void init(const Configuration& configuration) {
|
|
tt_check(i2c::init(configuration.i2c), "I2C init failed");
|
|
if (configuration.initHardware != nullptr) {
|
|
TT_LOG_I(TAG, "Init hardware");
|
|
tt_check(configuration.initHardware(), "Hardware init failed");
|
|
}
|
|
|
|
if (configuration.initBoot != nullptr) {
|
|
TT_LOG_I(TAG, "Init power");
|
|
tt_check(configuration.initBoot(), "Init power failed");
|
|
}
|
|
|
|
if (configuration.sdcard != nullptr) {
|
|
TT_LOG_I(TAG, "Mounting sdcard");
|
|
if (!configuration.sdcard->mount(TT_SDCARD_MOUNT_POINT)) {
|
|
TT_LOG_W(TAG, "SD card mount failed (init can continue)");
|
|
}
|
|
}
|
|
}
|
|
|
|
} // namespace
|