15 lines
258 B
C
15 lines
258 B
C
#include "led.h"
|
|
#include <avr/io.h>
|
|
|
|
void __attribute__ ((naked)) __attribute__ ((section (".init5"))) led_init() {
|
|
LED_DDR |= (1 << LED_PIN);
|
|
}
|
|
|
|
void led(uint8_t on) {
|
|
if (on) {
|
|
LED_PORT |= (1 << LED_PIN);
|
|
} else {
|
|
LED_PORT &= ~(1 << LED_PIN);
|
|
}
|
|
}
|