Repository navigation
chore: remove "only BCD mode is supported" build warning - #128
Merged
Merged
Conversation
On series whose RTC has no binary mode, setBinaryMode() emitted a compile-time #warning. Because STM32RTC.cpp is compiled in every build, this fired on every build for every sketch using the library, whether or not it called setBinaryMode() or asked for anything other than BCD. The runtime behavior is unchanged: on these series the mode is still forced to MODE_BCD, and getBinaryMode() reports the mode in effect. Fixes stm32duino#127 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fpistm
approved these changes
Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes issue #127
On series whose RTC has no binary mode,
setBinaryMode()contains a#warning "only BCD mode is supported".STM32RTC.cppis compiled in every build, so this warning appears on every build of every sketch that uses the library, including sketches that never callsetBinaryMode()or only ask forMODE_BCD. When a warning shows up on every build, people learn to scroll past it, and then they also miss new warnings that matter.This PR removes only that line. Behavior is unchanged:
setBinaryMode()still ignores the requested mode and setsMODE_BCD.getBinaryMode()still returns the mode in effect, so a sketch that needsMODE_BINorMODE_MIXcan check whether it got it.