Files
ZephCore/zephcore/adapters/clock/ZephyrRTCClock.h
T
liquidraver d5bd805710 peripherals & power: GPS fixes, poweroff/pwrmgt, upstream SensorManager telemetry
- gps: servers honour gps_enabled at boot (was lost on reboot; zc.gps_set
  upgrades older prefs to on once); sleep lock only while acquiring;
  gps off works on boards without a power line (UART sleep); UI toggles
  and fixes handled on the main thread; configure only after a good init;
  observer parks its GPS; one interval clamp (clampGpsInterval); one
  nav-mode knob (room servers on Air530Z now stationary); GNSS UARTE from DT
- gps: split into ZephyrGPSManager / gps_power / gps_module_cfg
  (+gps_internal.h); dead driver branches, gps_get_diag, sats_* removed
- clock: ZephyrRTCClock writes the hardware RTC itself (clkreboot now
  resets it); MESH_EVENT_RTC_SAVE gone
- power: one power-off path (zephcore_power_off, ZephyrBoard::powerOff),
  poweroff/shutdown CLI, get pwrmgt.*, crash record kept across reboot,
  battery reading cached 10 s, fuel gauge on the current API
- telemetry: upstream SensorManager + CayenneLPP (rounded to nearest),
  one builder for all roles; per-sensor channels, MCU temp always,
  guest gating and inverse mask on servers; sensor list/get/set work;
  BME280/BMP280 also probed at 0x77
- CLI: gps in upstream's form, get gps detail, gps sync
2026-09-25 17:56:34 +02:00

27 lines
664 B
C++

/*
* SPDX-License-Identifier: MIT
* Zephyr software RTC - boot-relative time with settable offset
*/
#pragma once
#include <mesh/MeshCore.h>
namespace mesh {
class ZephyrRTCClock : public RTCClock {
public:
uint32_t getCurrentTime() override;
/* Also written to the board's hardware RTC, if it has one, as upstream's
* AutoDiscoverRTCClock does: coalesced on the system work queue, so
* callers on any thread pay no I2C. */
void setCurrentTime(uint32_t time) override;
/* Boot only: the time just read from the hardware RTC, not written back. */
void seedCurrentTime(uint32_t time);
private:
uint32_t epoch_offset = 0;
};
} /* namespace mesh */