@@ -117,7 +117,7 @@ void Board::enableWakeupFromPin(uint8_t pin, PinStatus direction){
117
117
}
118
118
#endif
119
119
120
- #if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4 ) || defined(ARDUINO_NICLA_VISION)
120
+ #if defined(ARDUINO_PORTENTA_H7 ) || defined(ARDUINO_NICLA_VISION)
121
121
void Board::enableWakeupFromPin (){
122
122
standbyType |= StandbyType::untilPinActivity;
123
123
}
@@ -160,7 +160,7 @@ void Board::enableWakeupFromRTC(uint32_t hours, uint32_t minutes, uint32_t secon
160
160
}
161
161
#endif
162
162
163
- #if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4 ) || defined(ARDUINO_NICLA_VISION)
163
+ #if defined(ARDUINO_PORTENTA_H7 ) || defined(ARDUINO_NICLA_VISION)
164
164
void Board::enableWakeupFromRTC (uint32_t hours, uint32_t minutes, uint32_t seconds){
165
165
standbyType |= StandbyType::untilTimeElapsed;
166
166
wakeupDelayHours = hours;
@@ -178,7 +178,9 @@ void Board::sleepUntilWakeupEvent(){
178
178
void Board::standByUntilWakeupEvent (){
179
179
#if defined(ARDUINO_PORTENTA_C33)
180
180
lowPower -> deepSleep ();
181
- #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_NICLA_VISION)
181
+ #elif defined(ARDUINO_GENERIC_STM32H747_M4)
182
+ LowPower.standbyM4 ();
183
+ #elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION)
182
184
RTCWakeupDelay rtcWakeupDelay = RTCWakeupDelay (wakeupDelayHours, wakeupDelayMinutes, wakeupDelaySeconds);
183
185
if (standbyType == StandbyType::untilEither)
184
186
LowPower.standbyM7 (LowPowerStandbyType::untilPinActivity | LowPowerStandbyType::untilTimeElapsed, rtcWakeupDelay);
@@ -197,7 +199,7 @@ void Board::setAllPeripheralsPower(bool on){
197
199
// I2C needs to be shut down because the PMIC would still try
198
200
// to communicate with the MCU.
199
201
Wire3.end ();
200
- #else if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4 )
202
+ #else if defined(ARDUINO_PORTENTA_H7 )
201
203
// TODO Can we extract this into functions?
202
204
if (on){
203
205
PMIC.getControl () -> turnLDO2On (Ldo2Mode::Normal);
0 commit comments