File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
variants/STM32L4xx/L433C(B-C)(T-U)_L443CC(T-U) Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 9898 #define ENABLE_DISCHARGING LOW
9999#endif
100100
101+ // Macro functions for 3V3 regulator management
102+ #ifndef ENABLE_3V3_REGULATOR
103+ #define ENABLE_3V3_REGULATOR () do { \
104+ digitalWrite(DISCHARGE_3V3, DISABLE_DISCHARGING); \
105+ digitalWrite(ENABLE_3V3, HIGH); \
106+ } while (0)
107+ #endif
108+ #ifndef DISABLE_3V3_REGULATOR
109+ #define DISABLE_3V3_REGULATOR () do { \
110+ digitalWrite(ENABLE_3V3, LOW); \
111+ } while (0)
112+ #endif
113+ #ifndef DRAIN_3V3_REGULATOR_MS
114+ #define DRAIN_3V3_REGULATOR_MS (ms ) do { \
115+ if (digitalRead(ENABLE_3V3)) { break; } \
116+ digitalWrite(DISCHARGE_3V3, ENABLE_DISCHARGING); \
117+ delay(ms); \
118+ digitalWrite(DISCHARGE_3V3, DISABLE_DISCHARGING); \
119+ } while (0)
120+ #endif
121+
101122// Dedicated board pins
102123#ifndef VMAIN_ADC
103124 #define VMAIN_ADC PA4
You can’t perform that action at this time.
0 commit comments