Skip to content

Commit 30672ae

Browse files
committed
Only enable error message for boards that are known critical,
i.e. C33/H7/Nicla Vision.
1 parent c6e1bd4 commit 30672ae

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/PF1550.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@ class PF1550
6767
Sw1CurrentLimit const sw1_current_limit,
6868
bool const enable,
6969
bool const enable_in_standby,
70-
bool const enable_in_sleep) __attribute__ ((error("Erroneous usage of this API can cause board damage.")));
70+
bool const enable_in_sleep)
71+
#if defined(ARDUINO_PORTENTA_H33) || defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_NICLA_VISION)
72+
__attribute__ ((error("Erroneous usage of this API can cause board damage.")))
73+
#endif
74+
;
7175

7276
void configSw2(Sw2Voltage const sw2_volt,
7377
Sw2Voltage const sw2_volt_standby,

0 commit comments

Comments
 (0)