Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1734 | - | 1 | /***************************************************************************** |
2 | * Copyright (C) 2008 Thomas Kaiser, thomas@ft-fanpage.de * |
||
3 | * Copyright (C) 2009 Peter "woggle" Mack, mac@denich.net * |
||
4 | * Copyright (C) 2011 Christian "Cebra" Brandtner, brandtner@brandtner.net * |
||
5 | * Copyright (C) 2011 Harald Bongartz * |
||
6 | * * |
||
7 | * This program is free software; you can redistribute it and/or modify * |
||
8 | * it under the terms of the GNU General Public License as published by * |
||
9 | * the Free Software Foundation; either version 2 of the License. * |
||
10 | * * |
||
11 | * This program is distributed in the hope that it will be useful, * |
||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
||
14 | * GNU General Public License for more details. * |
||
15 | * * |
||
16 | * You should have received a copy of the GNU General Public License * |
||
17 | * along with this program; if not, write to the * |
||
18 | * Free Software Foundation, Inc., * |
||
19 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
||
20 | * * |
||
21 | * * |
||
22 | * Credits to: * |
||
23 | * Holger Buss & Ingo Busker from mikrokopter.de for the MK project + SVN * |
||
24 | * http://www.mikrokopter.de * |
||
25 | * Gregor "killagreg" Stobrawa for his version of the MK code * |
||
26 | * Thomas Kaiser "thkais" for the original project. See * |
||
27 | * http://www.ft-fanpage.de/mikrokopter/ * |
||
28 | * http://forum.mikrokopter.de/topic-4061-1.html * |
||
29 | * Claas Anders "CaScAdE" Rathje for providing the font and his C-OSD code * |
||
30 | * http://www.mylifesucks.de/oss/c-osd/ * |
||
31 | * Harald Bongartz "HaraldB" for providing his Ideas and Code for usibility* |
||
32 | *****************************************************************************/ |
||
33 | |||
34 | |||
35 | // * Hardwareabhängige Definitionen und Prozeduren |
||
36 | // * Hardware Leiterplatte V1.3 sebseb7 |
||
37 | // * USB,LED |
||
38 | |||
39 | |||
40 | /*Hardware 1.3.1 Portbelegung |
||
41 | |||
42 | Servo PD4 Pin 13 |
||
43 | Servo PD5 Pin 14 |
||
44 | Bootlader LED PC3 Pin 22 LED an GND |
||
45 | Summer PC6 Pin 25 Summer an GND |
||
46 | Displaybeleuchtung PD6 Pin 15 LED an + |
||
47 | Displaybeleuchtung PD7 Pin 16 LED an + |
||
48 | Displaybeleuchtung PC2 Pin 21 LED an + |
||
49 | Wi232 PC7 Pin 26 Wi232 CMD Pin |
||
50 | |||
51 | |||
52 | */ |
||
53 | |||
54 | |||
55 | |||
56 | |||
57 | #ifndef HAL_HW1_3_H_ |
||
58 | #define HAL_HW1_3_H_ |
||
59 | |||
60 | #define set_cs() (PORTB |= (1 << PB4)) // Display |
||
61 | #define clr_cs() (PORTB &= ~(1 << PB4)) |
||
62 | #define set_reset() (PORTB |= (1 << PB2)) |
||
63 | #define clr_reset() (PORTB &= ~(1 << PB2)) |
||
64 | #define set_A0() (PORTB |= (1 << PB3)) // Data |
||
65 | #define clr_A0() (PORTB &= ~(1 << PB3)) // Command |
||
66 | #define set_scl() (PORTB |= (1 << PB7)) |
||
67 | #define clr_scl() (PORTB &= ~(1 << PB7)) |
||
68 | #define set_si() (PORTB |= (1 << PB5)) |
||
69 | #define clr_si() (PORTB &= ~(1 << PB5)) |
||
70 | |||
71 | #define clr_LED1() (PORTC &= ~(1 << PC3)) // Leds |
||
72 | #define set_LED1() (PORTC |= (1 << PC3)) |
||
73 | |||
74 | #define set_LED2() (PORTC &= ~(1 << PC2)) |
||
75 | #define clr_LED2() (PORTC |= (1 << PC2)) |
||
76 | #define set_LED3() (PORTB &= ~(1 << PB1)) |
||
77 | #define clr_LED3() (PORTB |= (1 << PB1)) |
||
78 | #define set_LED4() (PORTB &= ~(1 << PB0)) |
||
79 | #define clr_LED4() (PORTB |= (1 << PB0)) |
||
80 | |||
81 | |||
82 | #define clr_BEEP() (PORTC &= ~(1 << PC6)) //Summer |
||
83 | #define set_BEEP() (PORTC |= (1 << PC6)) |
||
84 | |||
85 | |||
86 | #define set_WI232CMD() (PORTC &= ~(1 << PC7)) |
||
87 | #define clr_WI232CMD() (PORTC |= (1 << PC7)) |
||
88 | |||
89 | |||
90 | #define KEY_PIN PINA |
||
91 | |||
92 | |||
93 | #define KEY_ENTER PA7 |
||
94 | #define KEY_ESC PA6 |
||
95 | #define KEY_PLUS PA5 |
||
96 | #define KEY_MINUS PA4 |
||
97 | |||
98 | |||
99 | |||
100 | |||
101 | void set_D_LIGHT(void); /* Displaybeleuchtung ein*/ |
||
102 | void clr_D_LIGHT(void); /* Displaybeleuchtung aus*/ |
||
103 | |||
104 | |||
105 | void InitHWPorts(void); |
||
106 | void Port_USB2FC(void); |
||
107 | |||
108 | #endif /* HAL_HW1_3_H_ */ |