2018-01-28 20:40:50 +01:00
|
|
|
#include "led.h"
|
|
|
|
#include <avr/io.h>
|
|
|
|
|
2018-01-28 21:10:26 +01:00
|
|
|
void __attribute__ ((naked)) __attribute__ ((section (".init5"))) led_init() {
|
|
|
|
LED_DDR |= (1 << LED_PIN);
|
|
|
|
}
|
|
|
|
|
2018-01-28 20:40:50 +01:00
|
|
|
void led(uint8_t on) {
|
|
|
|
if (on) {
|
|
|
|
LED_PORT |= (1 << LED_PIN);
|
|
|
|
} else {
|
|
|
|
LED_PORT &= ~(1 << LED_PIN);
|
|
|
|
}
|
|
|
|
}
|