2a2558b29a
- Added generic GPS/GNSS support with device detection, configuration, and persistent settings. - Improved device and module lifecycle management. - Added flexible filesystem locking support for displays and storage. - Improved display-idle and keyboard backlight handling. - Updated architecture, driver, module, testing, and licensing documentation. - Removed old HAL device and related code.
28 lines
618 B
C++
28 lines
618 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <functional>
|
|
|
|
namespace tt::kernel {
|
|
|
|
enum class SystemEvent {
|
|
BootSplash,
|
|
/** Gained IP address */
|
|
NetworkConnected,
|
|
NetworkDisconnected,
|
|
Time,
|
|
};
|
|
|
|
/** Value 0 mean "no subscription" */
|
|
typedef uint32_t SystemEventSubscription;
|
|
constexpr SystemEventSubscription NoSystemEventSubscription = 0U;
|
|
|
|
typedef std::function<void(SystemEvent)> OnSystemEvent;
|
|
|
|
void publishSystemEvent(SystemEvent event);
|
|
|
|
SystemEventSubscription subscribeSystemEvent(SystemEvent event, OnSystemEvent handler);
|
|
|
|
void unsubscribeSystemEvent(SystemEventSubscription subscription);
|
|
|
|
} |