C++ conversion (#80)

Converted project to C++
This commit is contained in:
Ken Van Hoeylandt
2024-11-22 20:26:08 +01:00
committed by GitHub
parent 6d80144e12
commit 85e26636a3
488 changed files with 6017 additions and 39466 deletions
@@ -0,0 +1,48 @@
#pragma once
#include "TactilityCore.h"
#include "Sdcard.h"
#include "Power.h"
namespace tt::hal {
typedef bool (*Bootstrap)();
typedef bool (*InitGraphics)();
typedef void (*SetBacklightDuty)(uint8_t);
typedef struct {
/** Set backlight duty */
SetBacklightDuty set_backlight_duty;
} Display;
typedef struct {
/**
* Optional bootstrapping method (e.g. to turn peripherals on)
* This is called after Tactility core init and before any other inits in the HardwareConfig.
* */
const Bootstrap _Nullable bootstrap;
/**
* Initializes LVGL with all relevant hardware.
* This includes the display and optional pointer devices (such as touch) or a keyboard.
*/
const InitGraphics init_graphics;
/**
* An interface for display features such as setting the backlight.
* This does nothing when a display isn't present.
*/
const Display display;
/**
* An optional SD card interface.
*/
const sdcard::SdCard* _Nullable sdcard;
/**
* An optional power interface for battery or other power delivery.
*/
const Power* _Nullable power;
} Configuration;
} // namespace