mixer-slider/firmware/slider/led.h

34 lines
459 B
C
Raw Normal View History

2019-02-09 21:33:45 +01:00
/*
* 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
#define led_toggle() do { \
LED_REG ^= (1<<LED_PIN); \
} while(0)
2019-02-09 21:33:45 +01:00
#define led_off() do { \
LED_REG |= (1<<LED_PIN); \
} while(0)
2019-02-09 21:33:45 +01:00
#define led_on() do { \
LED_REG &= ~(1<<LED_PIN); \
} while(0)
2019-02-09 21:33:45 +01:00
void led_init();
#endif /* LED_H_ */