Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
310 | pangu | 1 | |
2 | #include <avr/io.h> |
||
3 | #include <util/delay.h> |
||
4 | #include <stdint.h> |
||
5 | #include <avr/interrupt.h> |
||
6 | |||
7 | #include "timer.h" |
||
8 | |||
9 | #define LED_1 PB2 // LED port 1 |
||
10 | #define LED_2 PC1 // LED port 2 |
||
11 | #define LED_3 PC2 // LED port 3 |
||
12 | #define LED_4 PC3 // LED port 4 |
||
13 | #define LED_5 PC4 // LED port 5 |
||
14 | #define LED_6 PC5 // LED port 6 |
||
15 | #define LED_7 PD4 // LED port 7 |
||
16 | #define LED_8 PD5 // LED port 8 |
||
17 | #define LED_9 PD6 // LED port 9 |
||
18 | #define LED_10 PD7 // LED port 10 |
||
19 | #define LED_STATUS PB0 // LED blau - on board |
||
20 | |||
21 | #define STATUS_OFF PORTB |= (1<<LED_STATUS) //Den Portpin auf high setzen |
||
22 | #define STATUS_ON PORTB &= ~(1<<LED_STATUS) //Den Portpin auf low setzen |
||
23 | #define STATUS_TOGGLE PORTB ^= (1<<LED_STATUS) //Den Portpin toggeln |
||
24 | |||
25 | #define LED_1_ON PORTB |= (1<<LED_1) //Den Portpin auf high setzen |
||
26 | #define LED_1_OFF PORTB &= ~(1<<LED_1) //Den Portpin auf low setzen |
||
27 | |||
28 | #define LED_2_ON PORTC |= (1<<LED_2) //Den Portpin auf high setzen |
||
29 | #define LED_2_OFF PORTC &= ~(1<<LED_2) //Den Portpin auf low setzen |
||
30 | #define LED_3_ON PORTC |= (1<<LED_3) //Den Portpin auf high setzen |
||
31 | #define LED_3_OFF PORTC &= ~(1<<LED_3) //Den Portpin auf low setzen |
||
32 | #define LED_4_ON PORTC |= (1<<LED_4) //Den Portpin auf high setzen |
||
33 | #define LED_4_OFF PORTC &= ~(1<<LED_4) //Den Portpin auf low setzen |
||
34 | #define LED_5_ON PORTC |= (1<<LED_5) //Den Portpin auf high setzen |
||
35 | #define LED_5_OFF PORTC &= ~(1<<LED_5) //Den Portpin auf low setzen |
||
36 | #define LED_6_ON PORTC |= (1<<LED_6) |
||
37 | #define LED_6_OFF PORTC &= ~(1<<LED_6) |
||
38 | |||
39 | #define LED_7_ON PORTD |= (1<<LED_7) |
||
40 | #define LED_7_OFF PORTD &= ~(1<<LED_7) |
||
41 | #define LED_8_ON PORTD |= (1<<LED_8) |
||
42 | #define LED_8_OFF PORTD &= ~(1<<LED_8) |
||
43 | #define LED_9_ON PORTD |= (1<<LED_9) |
||
44 | #define LED_9_OFF PORTD &= ~(1<<LED_9) |
||
45 | #define LED_10_ON PORTD |= (1<<LED_10) |
||
46 | #define LED_10_OFF PORTD &= ~(1<<LED_10) |
||
47 | |||
48 | #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); |
||
49 | #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); |
||
50 |