Skip to content

Commit 5ce6016

Browse files
committed
Fix compilation error for Portenta C33
1 parent 7fe3ced commit 5ce6016

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Board.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#include "Board.h"
22
#include "MAX1726Driver.h"
3-
#include "Arduino_LowPowerPortentaH7.h"
43
#include <map>
54

6-
LowPowerPortentaH7& PortentaH7 = LowPowerPortentaH7::getInstance();
5+
#if defined(ARDUINO_PORTENTA_H7)
6+
#include "Arduino_LowPowerPortentaH7.h"
7+
LowPowerPortentaH7& portentaH7LowPower = LowPowerPortentaH7::getInstance();
8+
#endif
79

810
constexpr int UNKNOWN_VALUE = 0xFF;
911

@@ -197,13 +199,14 @@ void Board::setAllPeripheralsPower(bool on){
197199
PMIC.getControl() -> turnLDO3On(Ldo3Mode::Normal);
198200
PMIC.getControl() -> turnSw1On(Sw1Mode::Normal);
199201
} else {
202+
#if defined(ARDUINO_PORTENTA_H7)
200203
// Ethernet must be turned off before we enter Standby Mode, because
201204
// otherwise, the Ethernet transmit termination resistors will overheat
202205
// from the voltage that gets applied over them. It would be 125 mW in each
203206
// of them, while they are rated at 50 mW. If we fail to turn off Ethernet,
204207
// we must not proceed.
205208

206-
if (false == PortentaH7.turnOffEthernet())
209+
if (false == portentaH7LowPower.turnOffEthernet())
207210
{
208211
{
209212
while(1)
@@ -215,6 +218,7 @@ void Board::setAllPeripheralsPower(bool on){
215218
}
216219
}
217220
}
221+
#endif
218222
PMIC.getControl() -> turnLDO1Off(Ldo1Mode::Normal);
219223
PMIC.getControl() -> turnLDO2Off(Ldo2Mode::Normal);
220224
PMIC.getControl() -> turnLDO3Off(Ldo3Mode::Normal);

0 commit comments

Comments
 (0)