mendel.c: ifdefs for hardware features in powerdown code

This commit is contained in:
Ben Jackson 2011-03-02 00:52:03 -08:00 committed by Michael Moon
parent ea4fdcf26a
commit 3543c6f081
1 changed files with 6 additions and 2 deletions

View File

@ -28,9 +28,13 @@ void io_init(void) {
PRR = MASK(PRTWI) | MASK(PRADC) | MASK(PRSPI); PRR = MASK(PRTWI) | MASK(PRADC) | MASK(PRSPI);
#elif defined PRR0 #elif defined PRR0
PRR0 = MASK(PRTWI) | MASK(PRADC) | MASK(PRSPI); PRR0 = MASK(PRTWI) | MASK(PRADC) | MASK(PRSPI);
#ifdef PRR1 #if defined(PRUSART3)
// don't use USART2 or USART3- leave USART1 for GEN3 and derivatives // don't use USART2 or USART3- leave USART1 for GEN3 and derivatives
PRR1 = MASK(PRUSART3) | MASK(PRUSART2); PRR1 |= MASK(PRUSART3) | MASK(PRUSART2);
#endif
#if defined(PRUSART2)
// don't use USART2 or USART3- leave USART1 for GEN3 and derivatives
PRR1 |= MASK(PRUSART2);
#endif #endif
#endif #endif
ACSR = MASK(ACD); ACSR = MASK(ACD);