]> www.fi.muni.cz Git - bike-lights.git/blobdiff - gpio.c
firmware source moved into subdirectory
[bike-lights.git] / gpio.c
diff --git a/gpio.c b/gpio.c
deleted file mode 100644 (file)
index 2ee3210..0000000
--- a/gpio.c
+++ /dev/null
@@ -1,27 +0,0 @@
-#include <avr/io.h>
-
-#include "lights.h"
-
-void gpio_init()
-{
-       DDRB |= _BV(PB2) | _BV(PB4);
-       PORTB &=~ (_BV(PB2) | _BV(PB4));
-
-       gpio_set(GPIO_LED2, 1);
-}
-
-void gpio_set(unsigned char n, unsigned char on)
-{
-       unsigned char bits = 0;
-       switch(n) {
-       case GPIO_LED1: bits = _BV(PB4); break;
-       case GPIO_LED2: bits = _BV(PB2); break;
-       }
-
-       if (on) {
-               PORTB |= bits;
-       } else {
-               PORTB &= ~bits;
-       }
-}
-