Skip to content

Commit 5861150

Browse files
committed
fix: adapt RTC examples for ArduinoCore-API integration
Signed-off-by: Aymane Bahssain <aymane.bahssain@st.com>
1 parent 5da2cfc commit 5861150

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/RTC_Seconds/RTC_Seconds.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const byte day = 25;
4646
const byte month = 11;
4747
const byte year = 21;
4848

49-
bool toggling = false; // changed each second by the CallBack function
49+
PinStatus toggling = LOW; // changed each second by the CallBack function
5050

5151
static STM32RTC::Hour_Format hourFormat = STM32RTC::HOUR_24;
5252
static STM32RTC::AM_PM period = STM32RTC::AM;
@@ -109,5 +109,5 @@ void loop()
109109
void rtc_SecondsCB(void *data)
110110
{
111111
UNUSED(data);
112-
toggling = !toggling;
112+
toggling = (toggling == LOW) ? HIGH : LOW;PinStatus toggling = LOW;
113113
}

0 commit comments

Comments
 (0)