Skip to content

Commit aa76d26

Browse files
authored
Update hwCPUVoltage to support ATmega1284P (#1494)
Thanks for this contribution @j54n1n That microcontroller gets used for example on the MoteinoMEGA board from LowPowerLab. Resolves: #1442 See also: https://lowpowerlab.com/guide/moteino/
1 parent 7a5a98f commit aa76d26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hal/architecture/AVR/MyHwAVR.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ bool hwUniqueID(unique_id_t *uniqueID)
289289
uint16_t hwCPUVoltage(void)
290290
{
291291
// Measure Vcc against 1.1V Vref
292-
#if defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
292+
#if defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1284P__)
293293
ADMUX = (_BV(REFS0) | _BV(MUX4) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1));
294294
#elif defined (__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__)
295295
ADMUX = (_BV(MUX5) | _BV(MUX0));

0 commit comments

Comments
 (0)