File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
1
#include " Board.h"
2
2
#include " MAX1726Driver.h"
3
- #include " Arduino_LowPowerPortentaH7.h"
4
3
#include < map>
5
4
6
- LowPowerPortentaH7& PortentaH7 = LowPowerPortentaH7::getInstance();
5
+ #if defined(ARDUINO_PORTENTA_H7)
6
+ #include " Arduino_LowPowerPortentaH7.h"
7
+ LowPowerPortentaH7& lowPowerPortentaH7 = LowPowerPortentaH7::getInstance();
8
+ #endif
7
9
8
10
constexpr int UNKNOWN_VALUE = 0xFF ;
9
11
@@ -197,13 +199,14 @@ void Board::setAllPeripheralsPower(bool on){
197
199
PMIC.getControl () -> turnLDO3On (Ldo3Mode::Normal);
198
200
PMIC.getControl () -> turnSw1On (Sw1Mode::Normal);
199
201
} else {
202
+ #if defined(ARDUINO_PORTENTA_H7)
200
203
// Ethernet must be turned off before we enter Standby Mode, because
201
204
// otherwise, the Ethernet transmit termination resistors will overheat
202
205
// from the voltage that gets applied over them. It would be 125 mW in each
203
206
// of them, while they are rated at 50 mW. If we fail to turn off Ethernet,
204
207
// we must not proceed.
205
208
206
- if (false == PortentaH7 .turnOffEthernet ())
209
+ if (false == lowPowerPortentaH7 .turnOffEthernet ())
207
210
{
208
211
{
209
212
while (1 )
@@ -215,6 +218,7 @@ void Board::setAllPeripheralsPower(bool on){
215
218
}
216
219
}
217
220
}
221
+ #endif
218
222
PMIC.getControl () -> turnLDO1Off (Ldo1Mode::Normal);
219
223
PMIC.getControl () -> turnLDO2Off (Ldo2Mode::Normal);
220
224
PMIC.getControl () -> turnLDO3Off (Ldo3Mode::Normal);
You can’t perform that action at this time.
0 commit comments