Skip to content

Define a generic RTC device ioctl contract - #29

Merged
JohnAmadis merged 1 commit into
mainfrom
feat/rtc-device-contract
Oct 16, 2026
Merged

JohnAmadis merged 1 commit into
mainfrom
feat/rtc-device-contract

Conversation

@JaxCalder

Copy link
Copy Markdown
Contributor

RTC clients need a shared device contract to work with MCU calendars, external RTC chips and virtual clocks. Add DMDRVI_IOCTL_RTC_{GET_TIME,SET_TIME,GET_STATUS,GET_INFO,INVALIDATE} in the 0x600 category, fixed-width calendar/status/info structures, optional write/invalidate/loss-detection capabilities, and precise error/access semantics. The calendar carries no implicit timezone or authenticated UTC policy; that belongs to dmutc.

GET_INFO exposes supported years and granularity. Unsupported precision is rejected without truncation, unset/lost calendars return ENODATA, and loss continuity is only meaningful when advertised. ABI layout/category assertions and collision coverage include the new commands. The DMR packages the public headers, generated definitions and itself; the diagnostic has its own resource manifest.

Validation: native diagnostic 6/6; Cortex-M4/M7 builds with the architecture tools-cfg.cmake supplied as CMAKE_TOOLCHAIN_FILE; STM32F746G-DISCO diagnostic 6/6, RTC integration 11/11 and RNG regression 6/6. Hardware evidence: https://github.com/choco-technologies/dmrtc/blob/feat/stm32-rtc/docs/validation/rtc-device-contract-2026-10-16.txt

Consumer: choco-technologies/dmrtc#1. Merge and release this interface before rebuilding that consumer against the public registry. Validation used local unreleased headers, with no dependency pins added to consumer source.

@JohnAmadis
JohnAmadis merged commit d46726b into main Oct 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants