NiboRoboLib 3.6 - NIBO Library
Hauptseite
Zusätzliche Informationen
Klassen
Dateien
Auflistung der Dateien
Datei-Elemente
nibo
iodefs_nibo1.h
gehe zur Dokumentation dieser Datei
1
/* BSD-License:
2
3
Copyright (c) 2007 by Nils Springob, nicai-systems, Germany
4
5
All rights reserved.
6
7
Redistribution and use in source and binary forms, with or without modification,
8
are permitted provided that the following conditions are met:
9
10
* Redistributions of source code must retain the above copyright notice,
11
this list of conditions and the following disclaimer.
12
* Redistributions in binary form must reproduce the above copyright notice,
13
this list of conditions and the following disclaimer in the documentation
14
and/or other materials provided with the distribution.
15
* Neither the name nicai-systems nor the names of its contributors may be
16
used to endorse or promote products derived from this software without
17
specific prior written permission.
18
19
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31
*/
32
40
#define IO_LEDS_RED_PORT PORTE
41
#define IO_LEDS_RED_MASK 0xfc
42
#define IO_LEDS_RED_DDR DDRE
43
45
#define IO_LEDS_GREEN_PORT PORTC
46
#define IO_LEDS_GREEN_MASK 0xfc
47
#define IO_LEDS_GREEN_DDR DDRC
48
50
#define IO_LED_WHITE_PORT PORTB
51
#define IO_LED_WHITE_BIT 5
52
#define IO_LED_WHITE_DDR DDRB
53
55
#define IO_DISP_LIGHT_PORT PORTB
56
#define IO_DISP_LIGHT_BIT 6
57
#define IO_DISP_LIGHT_DDR DDRB
58
59
60
62
#define IO_LINE_FLOOR_EN IO_LINE_FLOOR_EN
63
#define IO_LINE_FLOOR_EN_PORT PORTG
64
#define IO_LINE_FLOOR_EN_BIT 0
65
#define IO_LINE_FLOOR_EN_DDR DDRG
66
67
69
#define AN_FLOOR_R 0
70
#define AN_FLOOR_L 1
71
#define AN_LINE_L 2
72
#define AN_LINE_R 3
73
#define AN_VBAT 7
77
#define IO_DISPLAY_RS IO_DISPLAY_RS
78
#define IO_DISPLAY_RS_PORT PORTG
79
#define IO_DISPLAY_RS_BIT 3
80
#define IO_DISPLAY_RS_DDR DDRG
81
83
#define IO_DISPLAY_RW IO_DISPLAY_RW
84
#define IO_DISPLAY_RW_PORT PORTG
85
#define IO_DISPLAY_RW_BIT 4
86
#define IO_DISPLAY_RW_DDR DDRG
87
89
#define IO_DISPLAY_EN IO_DISPLAY_EN
90
#define IO_DISPLAY_EN_PORT PORTG
91
#define IO_DISPLAY_EN_BIT 2
92
#define IO_DISPLAY_EN_DDR DDRG
93
95
#define IO_DISPLAY_CS1 IO_DISPLAY_CS1
96
#define IO_DISPLAY_CS1_PORT PORTB
97
#define IO_DISPLAY_CS1_BIT 4
98
#define IO_DISPLAY_CS1_DDR DDRB
99
101
#define IO_DISPLAY_CS2 IO_DISPLAY_CS2
102
#define IO_DISPLAY_CS2_PORT PORTB
103
#define IO_DISPLAY_CS2_BIT 7
104
#define IO_DISPLAY_CS2_DDR DDRB
105
107
#define IO_DISPLAY_RST IO_DISPLAY_RST
108
#define IO_DISPLAY_RST_PORT PORTB
109
#define IO_DISPLAY_RST_BIT 0
110
#define IO_DISPLAY_RST_DDR DDRB
111
113
#define IO_DISPLAY_PORT PORTA
114
#define IO_DISPLAY_PIN PINA
115
#define IO_DISPLAY_DDR DDRA
116
117
119
#define IO_RESET_A_PORT PORTD
120
#define IO_RESET_A_BIT 4
121
#define IO_RESET_A_DDR DDRD
122
124
#define IO_RESET_B_PORT PORTD
125
#define IO_RESET_B_BIT 5
126
#define IO_RESET_B_DDR DDRD
127
129
#define IO_RESET_5_PORT PORTD
130
#define IO_RESET_5_BIT 6
131
#define IO_RESET_5_DDR DDRD
132
134
#define IO_RESET_3_PORT PORTD
135
#define IO_RESET_3_BIT 7
136
#define IO_RESET_3_DDR DDRD
137
138
140
#define IO_ISP_SCK_PORT PORTB
141
#define IO_ISP_SCK_BIT 1
142
#define IO_ISP_SCK_DDR DDRB
143
145
#define IO_ISP_MOSI_PORT PORTB
146
#define IO_ISP_MOSI_BIT 2
147
#define IO_ISP_MOSI_DDR DDRB
148
150
#define IO_ISP_MISO_PORT PORTB
151
#define IO_ISP_MISO_PIN PINB
152
#define IO_ISP_MISO_BIT 3
153
#define IO_ISP_MISO_DDR DDRB
154
155
157
#define I2C_BUF_SIZE 16
158
//#define I2C_TWBR_INIT 72 /* 100 kHz */
159
#define I2C_TWBR_INIT 12
/* 400 kHz */
160
161
163
#define IRCO_I2C_ID 42
164
166
#define MOTCO_I2C_ID 44
167
Erzeugt am Mit Jan 18 2017 00:18:52 für NIBO Library von
1.8.5