Skip to content

Commit 5da16e6

Browse files
Francois RAMUfpistm
Francois RAMU
authored andcommitted
stm32RTC can give the hour Format 24 or 12 hours
Adding a boolean (true) if the Hour format is 24 Hours. Signed-off-by: Francois RAMU <[email protected]>
1 parent 90414bc commit 5da16e6

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@ underflow. Used by STM32LoRaWAN.
190190
Refer to the Arduino RTC documentation for the other functions
191191
http://arduino.cc/en/Reference/RTC
192192

193+
### Since STM32RTC version higher than 1.4.0
194+
_IsFormat_24Hour_
195+
196+
Returns True if the current Hour Format is HOUR_24 else false if Hour format is HOUR_12
197+
198+
193199
## Source
194200

195201
Source files available at:

src/STM32RTC.h

+4
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,10 @@ class STM32RTC {
240240
{
241241
return RTC_IsConfigured();
242242
}
243+
bool isFormat_24hour(void)
244+
{
245+
return (_format == HOUR_24);
246+
}
243247
bool isAlarmEnabled(Alarm name = ALARM_A);
244248
bool isTimeSet(void)
245249
{

0 commit comments

Comments
 (0)