HAL renaming & relocation (#215)

Implemented more consistent naming:
- Moved all HAL devices into their own namespace (and related folder)
- Post-fixed all HAL device names with "Device"
This commit is contained in:
Ken Van Hoeylandt
2025-02-09 16:48:23 +01:00
committed by GitHub
parent a7a3b17ff6
commit 2345ba6d13
62 changed files with 263 additions and 250 deletions
@@ -1,15 +1,15 @@
#include "Tactility/lvgl/Statusbar.h"
#include "Tactility/lvgl/LvglSync.h"
#include "Tactility/hal/power/PowerDevice.h"
#include "Tactility/hal/sdcard/SdCardDevice.h"
#include <Tactility/Mutex.h>
#include <Tactility/Timer.h>
#include <Tactility/hal/Power.h>
#include <Tactility/hal/SdCard.h>
#include <Tactility/service/ServiceContext.h>
#include <Tactility/service/wifi/Wifi.h>
#include <Tactility/service/ServiceRegistry.h>
#include <Tactility/Tactility.h>
#include <Tactility/TactilityHeadless.h>
#include <Tactility/Timer.h>
#include <Tactility/service/ServiceContext.h>
#include <Tactility/service/ServiceRegistry.h>
#include <Tactility/service/wifi/Wifi.h>
namespace tt::service::statusbar {
@@ -70,9 +70,9 @@ static const char* getWifiStatusIcon(wifi::RadioState state, bool secure) {
}
}
static const char* getSdCardStatusIcon(hal::SdCard::State state) {
static const char* getSdCardStatusIcon(hal::sdcard::SdCardDevice::State state) {
switch (state) {
using enum hal::SdCard::State;
using enum hal::sdcard::SdCardDevice::State;
case Mounted:
return STATUSBAR_ICON_SDCARD;
case Error:
@@ -92,8 +92,8 @@ static _Nullable const char* getPowerStatusIcon() {
auto power = get_power();
hal::Power::MetricData charge_level;
if (!power->getMetric(hal::Power::MetricType::ChargeLevel, charge_level)) {
hal::power::PowerDevice::MetricData charge_level;
if (!power->getMetric(hal::power::PowerDevice::MetricType::ChargeLevel, charge_level)) {
return nullptr;
}
@@ -181,7 +181,7 @@ private:
auto sdcard = tt::hal::getConfiguration()->sdcard;
if (sdcard != nullptr) {
auto state = sdcard->getState();
if (state != hal::SdCard::State::Unknown) {
if (state != hal::sdcard::SdCardDevice::State::Unknown) {
auto* desired_icon = getSdCardStatusIcon(state);
if (sdcard_last_icon != desired_icon) {
auto icon_path = paths->getSystemPathLvgl(desired_icon);