Skip to content

Commit 18c509b

Browse files
committed
Fix compile errors
1 parent 742ff1b commit 18c509b

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

Diff for: src/Board.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ void Board::enableSleepWhenIdle(){
137137

138138

139139
#if defined(ARDUINO_PORTENTA_C33)
140-
void Board::enableWakeupFromRTC(uint32_t hours, uint32_t minutes, uint32_t seconds, void (* const callbackFunction)() = nullptr, RTClock * rtc = &RTC){
140+
bool Board::enableWakeupFromRTC(uint32_t hours, uint32_t minutes, uint32_t seconds, void (* const callbackFunction)(), RTClock * rtc){
141141
lowPower->enableWakeupFromRTC();
142142

143143
RTCTime currentTime;
@@ -169,11 +169,12 @@ void Board::enableWakeupFromRTC(uint32_t hours, uint32_t minutes, uint32_t secon
169169
#endif
170170

171171
#if defined(ARDUINO_PORTENTA_H7) || defined(ARDUINO_NICLA_VISION)
172-
void Board::enableWakeupFromRTC(uint32_t hours, uint32_t minutes, uint32_t seconds){
172+
bool Board::enableWakeupFromRTC(uint32_t hours, uint32_t minutes, uint32_t seconds){
173173
standbyType |= StandbyType::untilTimeElapsed;
174174
wakeupDelayHours = hours;
175175
wakeupDelayMinutes = minutes;
176176
wakeupDelaySeconds = seconds;
177+
return true;
177178
}
178179
#endif
179180

Diff for: src/Board.h

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
#include <Arduino_PF1550.h>
66
#include "WireUtils.h"
77

8-
#define ARDUINO_PORTENTA_H7 defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_GENERIC_STM32H747_M4)
8+
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_GENERIC_STM32H747_M4)
9+
#define ARDUINO_PORTENTA_H7
10+
#endif
911

1012
#if defined(ARDUINO_PORTENTA_C33)
1113
#include "Arduino_Portenta_C33_LowPower.h"
@@ -135,11 +137,11 @@ class Board {
135137
* If no RTC instance is provided, the default RTC instance is used.
136138
* @return True if successful, false otherwise.
137139
*/
138-
void enableWakeupFromRTC(uint32_t hours, uint32_t minutes, uint32_t seconds, void (* const callbackFunction)() = nullptr, RTClock * rtc = &RTC);
140+
bool enableWakeupFromRTC(uint32_t hours, uint32_t minutes, uint32_t seconds, void (* const callbackFunction)() = nullptr, RTClock * rtc = &RTC);
139141
#endif
140142

141143
#if defined(ARDUINO_PORTENTA_H7)
142-
void enableWakeupFromRTC(uint32_t hours, uint32_t minutes, uint32_t seconds);
144+
bool enableWakeupFromRTC(uint32_t hours, uint32_t minutes, uint32_t seconds);
143145
#endif
144146

145147

0 commit comments

Comments
 (0)