NiboRoboLib 3.6 - NIBO burger Library
Hauptseite
Zusätzliche Informationen
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
37
#define TICKS_PER_METER 705
38
#define TICKS_PER_TURN_SINGLE 520
39
#define TICKS_PER_TURN 500
40
42
#define IO_LEDS_PORT PORTB
43
#define IO_LEDS_MASK 0x1e
44
#define IO_LEDS_DDR DDRB
45
#define IO_LEDS_BIT_1 1
46
#define IO_LEDS_BIT_2 2
47
#define IO_LEDS_BIT_3 3
48
#define IO_LEDS_BIT_4 4
49
50
51
53
#define IO_MOTOR_PORT PORTD
54
#define IO_MOTOR_PIN PIND
55
#define IO_MOTOR_MASK 0xf0
56
#define IO_MOTOR_DDR DDRD
57
#define IO_MOTOR_BIT_PWM_LEFT 4
58
#define IO_MOTOR_BIT_PWM_RIGHT 5
59
#define IO_MOTOR_BIT_DIR_LEFT 6
60
#define IO_MOTOR_BIT_DIR_RIGHT 7
61
62
64
#define IO_ODO_PORT PORTD
65
#define IO_ODO_PIN PIND
66
#define IO_ODO_MASK 0x0c
67
#define IO_ODO_DDR DDRD
68
#define IO_ODO_BIT_LEFT 2
69
#define IO_ODO_BIT_RIGHT 3
70
71
72
74
#define IO_EN_FL IO_EN_FL
75
#define IO_EN_FL_PORT PORTC
76
#define IO_EN_FL_BIT 4
77
#define IO_EN_FL_DDR DDRC
78
79
#define IO_EN_FR IO_EN_FR
80
#define IO_EN_FR_PORT PORTC
81
#define IO_EN_FR_BIT 5
82
#define IO_EN_FR_DDR DDRC
83
84
#define IO_EN_BL IO_EN_BL
85
#define IO_EN_BL_PORT PORTC
86
#define IO_EN_BL_BIT 6
87
#define IO_EN_BL_DDR DDRC
88
89
#define IO_EN_BR IO_EN_BR
90
#define IO_EN_BR_PORT PORTC
91
#define IO_EN_BR_BIT 7
92
#define IO_EN_BR_DDR DDRC
93
94
#define IO_EN_FLL IO_EN_FLL
95
#define IO_EN_FLL_PORT PORTC
96
#define IO_EN_FLL_BIT 2
97
#define IO_EN_FLL_DDR DDRC
98
99
#define IO_EN_BC IO_EN_BC
100
#define IO_EN_BC_PORT PORTB
101
#define IO_EN_BC_BIT 0
102
#define IO_EN_BC_DDR DDRB
103
104
#define IO_EN_FRR IO_EN_FRR
105
#define IO_EN_FRR_PORT PORTC
106
#define IO_EN_FRR_BIT 3
107
#define IO_EN_FRR_DDR DDRC
108
109
110
111
113
#define IO_I2C_SDA_PORT PORTC
114
#define IO_I2C_SDA_PIN PINC
115
#define IO_I2C_SDA_BIT 1
116
#define IO_I2C_SDA_DDR DDRC
117
119
#define IO_I2C_SCL_PORT PORTC
120
#define IO_I2C_SCL_PIN PINC
121
#define IO_I2C_SCL_BIT 0
122
#define IO_I2C_SCL_DDR DDRC
123
124
125
127
#define IO_UART_RXD_PORT PORTD
128
#define IO_UART_RXD_PIN PIND
129
#define IO_UART_RXD_BIT 0
130
#define IO_UART_RXD_DDR DDRD
131
133
#define IO_UART_TXD_PORT PORTD
134
#define IO_UART_TXD_PIN PIND
135
#define IO_UART_TXD_BIT 1
136
#define IO_UART_TXD_DDR DDRD
137
138
139
141
#define IO_SPI_MISO_PORT PORTB
142
#define IO_SPI_MISO_PIN PINB
143
#define IO_SPI_MISO_BIT 6
144
#define IO_SPI_MISO_DDR DDRB
145
147
#define IO_SPI_MOSI_PORT PORTB
148
#define IO_SPI_MOSI_PIN PINB
149
#define IO_SPI_MOSI_BIT 5
150
#define IO_SPI_MOSI_DDR DDRB
151
153
#define IO_SPI_SCK_PORT PORTB
154
#define IO_SPI_SCK_PIN PINB
155
#define IO_SPI_SCK_BIT 7
156
#define IO_SPI_SCK_DDR DDRB
157
158
159
160
162
#define IO_ANALOG_PORT PORTA
163
#define IO_ANALOG_PIN PINA
164
#define IO_ANALOG_MASK 0xff
165
#define IO_ANALOG_DDR DDRA
166
167
#define IO_ANALOG_BIT_SENS_FRR 7
168
#define IO_ANALOG_BIT_SENS_BC 6
169
#define IO_ANALOG_BIT_SENS_FLL 5
170
#define IO_ANALOG_BIT_KEYBOARD 4
171
#define IO_ANALOG_BIT_SENS_BR 3
172
#define IO_ANALOG_BIT_SENS_BL 2
173
#define IO_ANALOG_BIT_SENS_FR 1
174
#define IO_ANALOG_BIT_SENS_FL 0
Erzeugt am Mit Jan 18 2017 00:18:51 für NIBO burger Library von
1.8.5