57 VCMP_Init_TypeDef vcmp = VCMP_INIT_DEFAULT;
60 vcmp.triggerLevel = VCMP_VoltageToLevel(vdd);
61 vcmp.warmup = vcmpWarmTime128Cycles;
62 vcmp.lowPowerRef =
false;
68 while (!VCMP_Ready()) ;
71 if (VCMP_VDDHigher())
return false;
Clock management unit (CMU) API.
Voltage Comparator (VCMP) peripheral API.
void VDDCHECK_Init(void)
VCMP initialization routine.
void CMU_ClockEnable(CMU_Clock_TypeDef clock, bool enable)
Enable/disable a clock.
Vdd voltage check routines, using VCMP.
void VDDCHECK_Disable(void)
VCMP deinitialization routine.
bool VDDCHECK_LowVoltage(float vdd)
Check if voltage is higher than indicated.