Files
ZephCore/zephcore/helpers/time_sync.h
T
liquidraver 094ea6e8a3 joystick UI:
- track real RTC sync source on the joystick Time screen
- gate joystick-only UI helpers behind stub headers so non-joystick builds skip the extra code without #ifdef at every call site.
2026-05-22 11:38:51 +02:00

39 lines
637 B
C

/*
* SPDX-License-Identifier: Apache-2.0
* Joystick UI: track which source last set the RTC (System > Info > Time).
*/
#pragma once
#include <zephyr/sys/util.h>
#ifdef __cplusplus
extern "C" {
#endif
enum time_sync_source {
TIME_SYNC_NONE = 0,
TIME_SYNC_GPS,
TIME_SYNC_APP,
TIME_SYNC_WIFI,
TIME_SYNC_CLI,
};
#if IS_ENABLED(CONFIG_ZEPHCORE_UI_DESIGN_JOYSTICK)
void time_sync_report(enum time_sync_source src);
const char *time_sync_display_label(void);
#else
static inline void time_sync_report(enum time_sync_source src)
{
ARG_UNUSED(src);
}
#endif /* CONFIG_ZEPHCORE_UI_DESIGN_JOYSTICK */
#ifdef __cplusplus
}
#endif