IoT-MBBR (masterthesis)
Masterthesis upgrading a Moving Bed BioReactor with extra sensors and cloud connectivity.
pin_mapping.h
Go to the documentation of this file.
1 /***************************************************************************//**
2  * @file pin_mapping.h
3  * @brief The pin definitions for the custom board.
4  * @version 1.0
5  * @author Brecht Van Eeckhoudt
6  *
7  * ******************************************************************************
8  *
9  * @section Versions
10  *
11  * @li v1.0: Initial version.
12  *
13  * ******************************************************************************
14  *
15  * @section License
16  *
17  * **Copyright (C) 2020 - Brecht Van Eeckhoudt**
18  *
19  * This program is free software: you can redistribute it and/or modify
20  * it under the terms of the **GNU General Public License** as published by
21  * the Free Software Foundation, either **version 3** of the License, or
22  * (at your option) any later version.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27  * GNU General Public License for more details.
28  *
29  * *A copy of the GNU General Public License can be found in the `LICENSE`
30  * file along with this source code.*
31  *
32  * @n
33  *
34  * Some methods use code obtained from examples from [Silicon Labs' GitHub](https://github.com/SiliconLabs/peripheral_examples).
35  * These sections are licensed under the Silabs License Agreement. See the file
36  * "Silabs_License_Agreement.txt" for details. Before using this software for
37  * any purpose, you must agree to the terms of that agreement.
38  *
39  ******************************************************************************/
40 
41 
42 /* Include guards prevent multiple inclusions of the same header */
43 #ifndef _PIN_MAPPING_H_
44 #define _PIN_MAPPING_H_
45 
46 
47 /* Include necessary for this header file */
48 #include "em_device.h" /* Include necessary MCU-specific header file */
49 #include "em_gpio.h" /* General Purpose IO */
50 
51 
52 /* I2C */
53 #define BUS_I2C I2C0
54 #define BUS_I2C_LOC I2C_ROUTE_LOCATION_LOC0
55 #define BUS_SDA_PORT gpioPortA
56 #define BUS_SDA_PIN 0
57 #define BUS_SCL_PORT gpioPortA
58 #define BUS_SCL_PIN 1
59 
60 /* BUTTON */
61 #define BTN_PORT gpioPortA
62 #define BTN_PIN 2
63 
64 /* VL53L1X */
65 #define VL53L1X_GPIO1_PORT gpioPortF
66 #define VL53L1X_GPIO1_PIN 4
67 #define VL53L1X_XSHUT_PORT gpioPortF
68 #define VL53L1X_XSHUT_PIN 5
69 
70 /* BG96 */
71 #define BG96_UART USART1
72 #define BG96_UART_LOC 0
73 #define BG96_TXD_PORT gpioPortC
74 #define BG96_TXD_PIN 1
75 #define BG96_RXD_PORT gpioPortC
76 #define BG96_RXD_PIN 0
77 #define BG96_PWRKEY_PORT gpioPortC
78 #define BG96_PWRKEY_PIN 2
79 #define BG96_RESET_PORT gpioPortC
80 #define BG96_RESET_PIN 3
81 #define BG96_STAT_PORT gpioPortC
82 #define BG96_STAT_PIN 4
83 #define BG96_DTR_PORT gpioPortA
84 #define BG96_DTR_PIN 8
85 #define BG96_RI_PORT gpioPortA
86 #define BG96_RI_PIN 9
87 
88 /* DEBUG UART */
89 #define DBG_UART USART0
90 #define DBG_UART_LOC 2
91 #define DBG_TXD_PORT gpioPortC
92 #define DBG_TXD_PIN 11
93 #define DBG_RXD_PORT gpioPortC
94 #define DBG_RXD_PIN 10
95 #define DBG_GNDD_PORT gpioPortC
96 #define DBG_GNDD_PIN 15
97 
98 /* DS18B20 */
99 #define TEMP0_DATA_PORT gpioPortC
100 #define TEMP0_DATA_PIN 8
101 #define TEMP0_VDD_PORT gpioPortC
102 #define TEMP0_VDD_PIN 9
103 #define TEMP1_DATA_PORT gpioPortA
104 #define TEMP1_DATA_PIN 10
105 #define TEMP1_VDD_PORT gpioPortB
106 #define TEMP1_VDD_PIN 11
107 
108 /* PULSE INPUTS */
109 #define PULSE0_PORT gpioPortC /* PCNT0_S0IN #0 */
110 #define PULSE0_PIN 13
111 #define PULSE1_PORT gpioPortC /* PCNT0_S1IN #0 */
112 #define PULSE1_PIN 14
113 
114 /* ADC INPUTS */
115 #define ADC0_PORT gpioPortD /* ADC0_CH4 */
116 #define ADC0_PIN 4
117 #define ADC1_PORT gpioPortD /* ADC0_CH5 */
118 #define ADC1_PIN 5
119 #define ADC2_PORT gpioPortD /* ADC0_CH6 */
120 #define ADC2_PIN 6
121 #define ADC3_PORT gpioPortD /* ADC0_CH7 */
122 #define ADC3_PIN 7
123 
124 /* SPARE */
125 #define J28_0_PORT gpioPortE
126 #define J28_0_PIN 10
127 #define J28_1_PORT gpioPortE
128 #define J28_1_PIN 11
129 #define J28_2_PORT gpioPortE
130 #define J28_2_PIN 12
131 #define J28_3_PORT gpioPortE
132 #define J28_3_PIN 13
133 #define J29_0_PORT gpioPortF
134 #define J29_0_PIN 2
135 #define J29_1_PORT gpioPortF
136 #define J29_1_PIN 3
137 
138 
139 #endif /* _PIN_MAPPING_H_ */