Skip to content

Commit

Permalink
stm32RTC can give the hour Format 24 or 12 hours
Browse files Browse the repository at this point in the history
Adding a boolean (true) if the Hour format is 24 Hours.

Signed-off-by: Francois RAMU <[email protected]>
  • Loading branch information
Francois RAMU authored and fpistm committed Feb 26, 2024
1 parent 90414bc commit 5da16e6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
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

0 comments on commit 5da16e6

Please sign in to comment.