mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-04-29 11:25:27 -04:00
23 lines
492 B
C++
23 lines
492 B
C++
#pragma once
|
|
|
|
// static lifetime read only cache for (hw) states to not poll
|
|
// right now it serves data from:
|
|
// - battery
|
|
// it's not meant to serve as polling interface - rather to serve data
|
|
|
|
namespace Store
|
|
{
|
|
struct Battery
|
|
{
|
|
enum class State
|
|
{
|
|
Discharging,
|
|
Charging,
|
|
} state = State::Discharging;
|
|
unsigned int level = 0;
|
|
|
|
static const Battery &get();
|
|
static Battery &modify();
|
|
};
|
|
}; // namespace Store
|