use correct swtiching between pin input and output
(as per the datasheet, section 10.1.2),
remove old logic of wakeup LED notifications
void gpio_init()
{
- DDRB |= _BV(PB0) | _BV(PB2) | _BV(PB4) | _BV(PB6);
PORTB &=~ (_BV(PB0) | _BV(PB2) | _BV(PB4) | _BV(PB6));
-
- gpio_set(1, 1);
+ DDRB |= _BV(PB0) | _BV(PB2) | _BV(PB4) | _BV(PB6);
}
void susp_gpio()
{
- DDRB &= ~(_BV(PB0) | _BV(PB2) | _BV(PB4) | _BV(PB6));
PORTB &= ~(_BV(PB0) | _BV(PB2) | _BV(PB4) | _BV(PB6));
-}
-
-void gpio_before_poweroff()
-{
- DDRB |= _BV(PB2);
- PORTB |= _BV(PB2);
+ DDRB |= _BV(PB0) | _BV(PB2) | _BV(PB4) | _BV(PB6);
}
void gpio_set(unsigned char n, unsigned char on)
void gpio_init();
void susp_gpio();
void gpio_set(unsigned char n, unsigned char on);
-void gpio_before_poweroff();
/* ambient.c */
void ambient_init();