34 lines
423 B
C
34 lines
423 B
C
/*
|
|
* led.h
|
|
*
|
|
* Created on: 09.02.2019
|
|
* Author: julian
|
|
*/
|
|
|
|
#ifndef LED_H_
|
|
#define LED_H_
|
|
|
|
#include <avr/io.h>
|
|
|
|
/* led driver */
|
|
#define LED_DDR DDRB
|
|
#define LED_REG PORTB
|
|
#define LED_PIN 0
|
|
|
|
static inline void led_toggle() {
|
|
LED_REG ^= (1<<LED_PIN);
|
|
}
|
|
|
|
static inline void led_off() {
|
|
LED_REG |= (1<<LED_PIN);
|
|
}
|
|
|
|
static inline void led_on() {
|
|
LED_REG &= ~(1<<LED_PIN);
|
|
}
|
|
|
|
|
|
void led_init();
|
|
|
|
#endif /* LED_H_ */
|