Blame |
Last modification |
View Log
| RSS feed
#include <avr/io.h>
#include <util/delay.h>
#include <stdint.h>
#include <avr/interrupt.h>
#include "timer.h"
#define LED_1 PB2 // LED port 1
#define LED_2 PC1 // LED port 2
#define LED_3 PC2 // LED port 3
#define LED_4 PC3 // LED port 4
#define LED_5 PC4 // LED port 5
#define LED_6 PC5 // LED port 6
#define LED_7 PD4 // LED port 7
#define LED_8 PD5 // LED port 8
#define LED_9 PD6 // LED port 9
#define LED_10 PD7 // LED port 10
#define LED_STATUS PB0 // LED blau - on board
#define STATUS_OFF PORTB |= (1<<LED_STATUS) //Den Portpin auf high setzen
#define STATUS_ON PORTB &= ~(1<<LED_STATUS) //Den Portpin auf low setzen
#define STATUS_TOGGLE PORTB ^= (1<<LED_STATUS) //Den Portpin toggeln
#define LED_1_ON PORTB |= (1<<LED_1) //Den Portpin auf high setzen
#define LED_1_OFF PORTB &= ~(1<<LED_1) //Den Portpin auf low setzen
#define LED_2_ON PORTC |= (1<<LED_2) //Den Portpin auf high setzen
#define LED_2_OFF PORTC &= ~(1<<LED_2) //Den Portpin auf low setzen
#define LED_3_ON PORTC |= (1<<LED_3) //Den Portpin auf high setzen
#define LED_3_OFF PORTC &= ~(1<<LED_3) //Den Portpin auf low setzen
#define LED_4_ON PORTC |= (1<<LED_4) //Den Portpin auf high setzen
#define LED_4_OFF PORTC &= ~(1<<LED_4) //Den Portpin auf low setzen
#define LED_5_ON PORTC |= (1<<LED_5) //Den Portpin auf high setzen
#define LED_5_OFF PORTC &= ~(1<<LED_5) //Den Portpin auf low setzen
#define LED_6_ON PORTC |= (1<<LED_6)
#define LED_6_OFF PORTC &= ~(1<<LED_6)
#define LED_7_ON PORTD |= (1<<LED_7)
#define LED_7_OFF PORTD &= ~(1<<LED_7)
#define LED_8_ON PORTD |= (1<<LED_8)
#define LED_8_OFF PORTD &= ~(1<<LED_8)
#define LED_9_ON PORTD |= (1<<LED_9)
#define LED_9_OFF PORTD &= ~(1<<LED_9)
#define LED_10_ON PORTD |= (1<<LED_10)
#define LED_10_OFF PORTD &= ~(1<<LED_10)
#define ALLES_OFF LED_1_OFF;PORTC &= ~(1<<LED_2 & 1<<LED_3 & 1<<LED_4 & 1<<LED_5);PORTD &= ~(1<<LED_6 & 1<<LED_7 & 1<<LED_8 & 1<<LED_9 & 1<<LED_10);
#define ALLES_ON LED_1_ON;PORTC |= (1<<LED_2 & 1<<LED_3 & 1<<LED_4 & 1<<LED_5);PORTD |= (1<<LED_6 & 1<<LED_7 & 1<<LED_8 & 1<<LED_9 & 1<<LED_10);