-
Notifications
You must be signed in to change notification settings - Fork 38
/
mcu_definitions.h
212 lines (190 loc) · 5.48 KB
/
mcu_definitions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
/****************************************************************************
**
** Copyright (C) ${COPYRIGHT_YEAR} MikroElektronika d.o.o.
** Contact: https://www.mikroe.com/contact
**
** This file is part of the mikroSDK package
**
** Commercial License Usage
**
** Licensees holding valid commercial NECTO compilers AI licenses may use this
** file in accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The MikroElektronika Company.
** For licensing terms and conditions see
** https://www.mikroe.com/legal/software-license-agreement.
** For further information use the contact form at
** https://www.mikroe.com/contact.
**
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used for
** non-commercial projects under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** The above copyright notice and this permission notice shall be
** included in all copies or substantial portions of the Software.
**
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** OF MERCHANTABILITY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
** TO THE WARRANTIES FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
** DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
** OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
** OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**
****************************************************************************/
/*!
* @file mcu_definitions.h
* @brief MCU specific pin and module definitions.
*/
#ifndef _MCU_DEFINITIONS_H_
#define _MCU_DEFINITIONS_H_
#include "mcu_reg_addresses.h"
#include "dma_definitions.h"
#include "can_definitions.h"
//ADC
#define ADC0_IN0_PA0
#define ADC1_IN0_PA0
#define ADC0_IN1_PA1
#define ADC1_IN1_PA1
#define ADC0_IN2_PA2
#define ADC1_IN2_PA2
#define ADC0_IN3_PA3
#define ADC1_IN3_PA3
#define ADC0_IN4_PA4
#define ADC1_IN4_PA4
#define ADC0_IN5_PA5
#define ADC1_IN5_PA5
#define ADC0_IN6_PA6
#define ADC1_IN6_PA6
#define ADC0_IN7_PA7
#define ADC1_IN7_PA7
#define ADC0_IN8_PB0
#define ADC1_IN8_PB0
#define ADC0_IN9_PB1
#define ADC1_IN9_PB1
#define ADC_MODULE_0 (1)
#define ADC_MODULE_1 (2)
#define ADC_MODULE_COUNT (2)
//EOF ADC
//I2C
#define I2C0_SCL_PB6_REMAP_NONE
#define I2C0_SDA_PB7_REMAP_NONE
#define I2C0_SCL_PB8_REMAP_FULL
#define I2C0_SDA_PB9_REMAP_FULL
#define I2C_MODULE_0 (1)
#define I2C_MODULE_COUNT (1)
//EOF I2C
//U(S)ART
#define UART1_TX_PA2_REMAP_NONE
#define UART1_RX_PA3_REMAP_NONE
#define UART0_TX_PA9_REMAP_NONE
#define UART0_RX_PA10_REMAP_NONE
#define UART0_TX_PB6_REMAP_FULL
#define UART0_RX_PB7_REMAP_FULL
#define UART_MODULE_1 (2)
#define UART_MODULE_0 (1)
#define UART_MODULE_COUNT (2)
//EOF U(S)ART
//SPI
#define SPI0_SCK_PA5_REMAP_NONE
#define SPI0_MISO_PA6_REMAP_NONE
#define SPI0_MOSI_PA7_REMAP_NONE
#define SPI0_SCK_PB3_REMAP_FULL
#define SPI0_MISO_PB4_REMAP_FULL
#define SPI0_MOSI_PB5_REMAP_FULL
#define SPI_MODULE_0 (1)
#define SPI_MODULE_COUNT (1)
//EOF SPI
//TIM
#define TIMER1_CH0_PA0_REMAP_NONE
#define TIMER1_CH1_PA1_REMAP_NONE
#define TIMER1_CH2_PA2_REMAP_NONE
#define TIMER1_CH3_PA3_REMAP_NONE
#define TIMER2_CH0_PA6_REMAP_NONE
#define TIMER2_CH1_PA7_REMAP_NONE
#define TIMER0_CH0_PA7_REMAP_PARTIAL
#define TIMER0_CH0_ON_PA7_INVERTED_REMAP_NONE
#define TIMER2_CH2_PB0_REMAP_NONE
#define TIMER0_CH1_PB0_REMAP_PARTIAL
#define TIMER0_CH1_ON_PB0_INVERTED_REMAP_NONE
#define TIMER2_CH3_PB1_REMAP_NONE
#define TIMER0_CH2_PB1_REMAP_PARTIAL
#define TIMER0_CH2_ON_PB1_INVERTED_REMAP_NONE
#define TIMER1_CH2_PB10_REMAP_FULL
#define TIMER1_CH3_PB11_REMAP_FULL
#define TIMER0_CH0_PB13_REMAP_NONE
#define TIMER0_CH0_ON_PB13_INVERTED_REMAP_NONE
#define TIMER0_CH1_PB14_REMAP_NONE
#define TIMER0_CH1_ON_PB14_INVERTED_REMAP_NONE
#define TIMER0_CH2_PB15_REMAP_NONE
#define TIMER0_CH2_ON_PB15_INVERTED_REMAP_NONE
#define TIMER0_CH0_PA8_REMAP_NONE
#define TIMER0_CH1_PA9_REMAP_NONE
#define TIMER0_CH2_PA10_REMAP_NONE
#define TIMER0_CH3_PA11_REMAP_NONE
#define TIMER1_CH0_PA15_REMAP_NONE
#define TIMER1_CH1_PB3_REMAP_PARTIAL
#define TIMER2_CH0_PB4_REMAP_PARTIAL
#define TIMER2_CH1_PB5_REMAP_PARTIAL
#define TIM_MODULE_1 (2)
#define TIM_MODULE_2 (3)
#define TIM_MODULE_0 (1)
#define TIM_MODULE_COUNT (3)
//EOF TIM
//GPIO
#define __PC13_CN
#define __PC14_CN
#define __PC15_CN
#define __PA0_CN
#define __PA1_CN
#define __PA2_CN
#define __PA3_CN
#define __PA4_CN
#define __PA5_CN
#define __PA6_CN
#define __PA7_CN
#define __PB0_CN
#define __PB1_CN
#define __PB2_CN
#define __PB10_CN
#define __PB11_CN
#define __PB12_CN
#define __PB13_CN
#define __PB14_CN
#define __PB15_CN
#define __PA8_CN
#define __PA9_CN
#define __PA10_CN
#define __PA11_CN
#define __PA12_CN
#define __PA13_CN
#define __PA14_CN
#define __PA15_CN
#define __PB3_CN
#define __PB4_CN
#define __PB5_CN
#define __PB6_CN
#define __PB7_CN
#define __PB8_CN
#define __PB9_CN
#define __PD0_CN
#define __PD1_CN
#define __PORT_C_CN
#define __PORT_A_CN
#define __PORT_B_CN
#define __PORT_D_CN
#define PORT_SIZE (16)
#define PORT_COUNT (3)
//EOF GPIO
//IVT_TABLE
#define ECLIC_VECTOR_NUMBER_UART1 (57)
#define ECLIC_VECTOR_ADDRESS_UART1 (0x000000E4)
#define ECLIC_VECTOR_NUMBER_UART0 (56)
#define ECLIC_VECTOR_ADDRESS_UART0 (0x000000E0)
//EOF IVT_TABLE
#endif // _MCU_DEFINITIONS_H_
// ------------------------------------------------------------------------- END