Skip to content

stm32RTC can give the hour Format 24 or 12 hours #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,12 @@ underflow. Used by STM32LoRaWAN.
Refer to the Arduino RTC documentation for the other functions
http://arduino.cc/en/Reference/RTC

### Since STM32RTC version higher than 1.4.0
_IsFormat_24Hour_

Returns True if the current Hour Format is HOUR_24 else false if Hour format is HOUR_12


## Source

Source files available at:
Expand Down
4 changes: 4 additions & 0 deletions src/STM32RTC.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@ class STM32RTC {
{
return RTC_IsConfigured();
}
bool isFormat_24hour(void)
{
return (_format == HOUR_24);
}
bool isAlarmEnabled(Alarm name = ALARM_A);
bool isTimeSet(void)
{
Expand Down