From a06ea914a745c95ca286ea41337ff5bbf3d02cbd Mon Sep 17 00:00:00 2001 From: "Jan \"Yenya\" Kasprzak" Date: Sun, 30 Sep 2012 22:22:10 +0200 Subject: [PATCH] gpio: suspend function, status poweroff led --- firmware/gpio.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/firmware/gpio.c b/firmware/gpio.c index d1efaaa..d2a240b 100644 --- a/firmware/gpio.c +++ b/firmware/gpio.c @@ -13,6 +13,21 @@ void gpio_init() gpio_set(1, 1); } +void susp_gpio() +{ + DDRB &= ~(_BV(PB0) | _BV(PB2)); // LED4, LED5 + PORTB &=~ (_BV(PB0) | _BV(PB2)); + + DDRA &= ~(_BV(PA3) | _BV(PA4)); // LED6, LED7 + PORTA &=~ (_BV(PA3) | _BV(PA4)); +} + +void gpio_before_poweroff() +{ + DDRA |= _BV(PA4); + PORTA |= _BV(PA4); +} + void gpio_set(unsigned char n, unsigned char on) { if (on) { -- 2.43.5