@@ -314,7 +314,7 @@ void init()
314314
315315 /* Only for the purposes of staying within safe operating range -- approximate */
316316 if (voltage >= 48 ){ /* 4.8V+ -> 5V */
317- supply_voltage = VCC_5V ;
317+ supply_voltage = VCC_5V0 ;
318318 } else if (voltage >= 30 ){ /* 3V-4V7 -> 3V3 */
319319 supply_voltage = VCC_3V3 ;
320320 } else { /* < 3V -> 1V8 */
@@ -346,7 +346,7 @@ void init()
346346
347347 /* Initialize clock divider to stay within safe operating area */
348348
349- if (supply_voltage >= VCC_5V ){
349+ if (supply_voltage >= VCC_5V0 ){
350350
351351 /* Disable system clock prescaler - F_CPU should now be ~16/20MHz */
352352 _PROTECTED_WRITE (CLKCTRL_MCLKCTRLB , 0x00 );
@@ -368,7 +368,7 @@ void init()
368368
369369 }
370370
371- } else if (supply_voltage == VCC_3V3 ) {
371+ } else if (supply_voltage == VCC_3V3 ) {
372372
373373 /* Enable system clock prescaler to DIV2 - F_CPU should now be ~8/10MHz */
374374 _PROTECTED_WRITE (CLKCTRL_MCLKCTRLB , (CLKCTRL_PEN_bm | CLKCTRL_PDIV_2X_gc ));
@@ -389,7 +389,7 @@ void init()
389389 #endif
390390 }
391391
392- } else {
392+ } else {
393393 /* Shouldn't get here but just in case... */
394394
395395 /* Enable system clock prescaler to DIV4 - F_CPU should now be ~4/5MHz */
0 commit comments