Added screenshot mode config and updated copyright docs (#126)
This commit is contained in:
committed by
GitHub
parent
07f45b8fb0
commit
100c24f6a3
@@ -1,3 +1,4 @@
|
||||
#include "Tactility.h"
|
||||
#include "hal/Configuration.h"
|
||||
#include "hal/SimulatorPower.h"
|
||||
#include "LvglTask.h"
|
||||
@@ -7,6 +8,8 @@
|
||||
|
||||
#define TAG "hardware"
|
||||
|
||||
extern const tt::hal::sdcard::SdCard simulatorSdcard;
|
||||
|
||||
static bool initBoot() {
|
||||
lv_init();
|
||||
lvgl_task_start();
|
||||
@@ -28,7 +31,7 @@ extern const tt::hal::Configuration hardware = {
|
||||
.initBoot = initBoot,
|
||||
.createDisplay = createDisplay,
|
||||
.createKeyboard = createKeyboard,
|
||||
.sdcard = nullptr,
|
||||
.sdcard = &simulatorSdcard,
|
||||
.power = simulatorPower,
|
||||
.i2c = {
|
||||
tt::hal::i2c::Configuration {
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
#include "Tactility.h"
|
||||
#include "hal/sdcard/Sdcard.h"
|
||||
|
||||
static uint32_t fake_handle = 0;
|
||||
|
||||
static void* _Nullable sdcard_mount(TT_UNUSED const char* mount_point) {
|
||||
return &fake_handle;
|
||||
}
|
||||
|
||||
static void* sdcard_init_and_mount(TT_UNUSED const char* mount_point) {
|
||||
return &fake_handle;
|
||||
}
|
||||
|
||||
static void sdcard_unmount(TT_UNUSED void* context) {
|
||||
}
|
||||
|
||||
static bool sdcard_is_mounted(TT_UNUSED void* context) {
|
||||
return TT_SCREENSHOT_MODE;
|
||||
}
|
||||
|
||||
extern const tt::hal::sdcard::SdCard simulatorSdcard = {
|
||||
.mount = &sdcard_init_and_mount,
|
||||
.unmount = &sdcard_unmount,
|
||||
.is_mounted = &sdcard_is_mounted,
|
||||
.mount_behaviour = tt::hal::sdcard::MountBehaviourAtBoot
|
||||
};
|
||||
Reference in New Issue
Block a user