Add simple LED driver
This commit is contained in:
parent
1a77421caf
commit
81701220aa
3 changed files with 24 additions and 0 deletions
10
drivers/led.c
Normal file
10
drivers/led.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
#include "led.h"
|
||||
#include <avr/io.h>
|
||||
|
||||
void led(uint8_t on) {
|
||||
if (on) {
|
||||
LED_PORT |= (1 << LED_PIN);
|
||||
} else {
|
||||
LED_PORT &= ~(1 << LED_PIN);
|
||||
}
|
||||
}
|
3
drivers/led.h
Normal file
3
drivers/led.h
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include <stdint.h>
|
||||
|
||||
void led(uint8_t on);
|
Loading…
Add table
Add a link
Reference in a new issue