NiboRoboLib 3.3 - NIBO burger Library
Hauptseite
Klassen
Dateien
Auflistung der Dateien
Datei-Elemente
niboburger
iodefs_niboburger.h
gehe zur Dokumentation dieser Datei
1
/* BSD-License:
2
3
Copyright (c) 2015 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
39
#define TICKS_PER_METER 705
40
#define TICKS_PER_TURN_SINGLE 520
41
#define TICKS_PER_TURN 500
42
44
#define IO_LEDS_PORT PORTB
45
#define IO_LEDS_MASK 0x1e
46
#define IO_LEDS_DDR DDRB
47
#define IO_LEDS_BIT_1 1
48
#define IO_LEDS_BIT_2 2
49
#define IO_LEDS_BIT_3 3
50
#define IO_LEDS_BIT_4 4
51
52
53
55
#define IO_MOTOR_PORT PORTD
56
#define IO_MOTOR_PIN PIND
57
#define IO_MOTOR_MASK 0xf0
58
#define IO_MOTOR_DDR DDRD
59
#define IO_MOTOR_BIT_PWM_LEFT 4
60
#define IO_MOTOR_BIT_PWM_RIGHT 5
61
#define IO_MOTOR_BIT_DIR_LEFT 6
62
#define IO_MOTOR_BIT_DIR_RIGHT 7
63
64
66
#define IO_ODO_PORT PORTD
67
#define IO_ODO_PIN PIND
68
#define IO_ODO_MASK 0x0c
69
#define IO_ODO_DDR DDRD
70
#define IO_ODO_BIT_LEFT 2
71
#define IO_ODO_BIT_RIGHT 3
72
73
74
76
#define IO_EN_FL IO_EN_FL
77
#define IO_EN_FL_PORT PORTC
78
#define IO_EN_FL_BIT 4
79
#define IO_EN_FL_DDR DDRC
80
81
#define IO_EN_FR IO_EN_FR
82
#define IO_EN_FR_PORT PORTC
83
#define IO_EN_FR_BIT 5
84
#define IO_EN_FR_DDR DDRC
85
86
#define IO_EN_BL IO_EN_BL
87
#define IO_EN_BL_PORT PORTC
88
#define IO_EN_BL_BIT 6
89
#define IO_EN_BL_DDR DDRC
90
91
#define IO_EN_BR IO_EN_BR
92
#define IO_EN_BR_PORT PORTC
93
#define IO_EN_BR_BIT 7
94
#define IO_EN_BR_DDR DDRC
95
96
#define IO_EN_FLL IO_EN_FLL
97
#define IO_EN_FLL_PORT PORTC
98
#define IO_EN_FLL_BIT 2
99
#define IO_EN_FLL_DDR DDRC
100
101
#define IO_EN_BC IO_EN_BC
102
#define IO_EN_BC_PORT PORTB
103
#define IO_EN_BC_BIT 0
104
#define IO_EN_BC_DDR DDRB
105
106
#define IO_EN_FRR IO_EN_FRR
107
#define IO_EN_FRR_PORT PORTC
108
#define IO_EN_FRR_BIT 3
109
#define IO_EN_FRR_DDR DDRC
110
111
112
113
115
#define IO_I2C_SDA_PORT PORTC
116
#define IO_I2C_SDA_PIN PINC
117
#define IO_I2C_SDA_BIT 1
118
#define IO_I2C_SDA_DDR DDRC
119
121
#define IO_I2C_SCL_PORT PORTC
122
#define IO_I2C_SCL_PIN PINC
123
#define IO_I2C_SCL_BIT 0
124
#define IO_I2C_SCL_DDR DDRC
125
126
127
129
#define IO_UART_RXD_PORT PORTD
130
#define IO_UART_RXD_PIN PIND
131
#define IO_UART_RXD_BIT 0
132
#define IO_UART_RXD_DDR DDRD
133
135
#define IO_UART_TXD_PORT PORTD
136
#define IO_UART_TXD_PIN PIND
137
#define IO_UART_TXD_BIT 1
138
#define IO_UART_TXD_DDR DDRD
139
140
141
143
#define IO_SPI_MISO_PORT PORTB
144
#define IO_SPI_MISO_PIN PINB
145
#define IO_SPI_MISO_BIT 6
146
#define IO_SPI_MISO_DDR DDRB
147
149
#define IO_SPI_MOSI_PORT PORTB
150
#define IO_SPI_MOSI_PIN PINB
151
#define IO_SPI_MOSI_BIT 5
152
#define IO_SPI_MOSI_DDR DDRB
153
155
#define IO_SPI_SCK_PORT PORTB
156
#define IO_SPI_SCK_PIN PINB
157
#define IO_SPI_SCK_BIT 7
158
#define IO_SPI_SCK_DDR DDRB
159
160
161
162
164
#define IO_ANALOG_PORT PORTA
165
#define IO_ANALOG_PIN PINA
166
#define IO_ANALOG_MASK 0xff
167
#define IO_ANALOG_DDR DDRA
168
169
#define IO_ANALOG_BIT_SENS_FRR 7
170
#define IO_ANALOG_BIT_SENS_BC 6
171
#define IO_ANALOG_BIT_SENS_FLL 5
172
#define IO_ANALOG_BIT_KEYBOARD 4
173
#define IO_ANALOG_BIT_SENS_BR 3
174
#define IO_ANALOG_BIT_SENS_BL 2
175
#define IO_ANALOG_BIT_SENS_FR 1
176
#define IO_ANALOG_BIT_SENS_FL 0
Erzeugt am Sam Jan 2 2016 17:57:46 für NIBO burger Library von
1.8.5