Skip to content

Commit f8830d1

Browse files
authored
Merge pull request #255 from MikroElektronika/new-feature/boards_cards/24
Merge branch new-feature/boards_cards/24 into master
2 parents dcfb86f + 22661e6 commit f8830d1

File tree

17 files changed

+1084
-0
lines changed

17 files changed

+1084
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
if(${_MSDK_BOARD_NAME_} STREQUAL "EXPLORER_8_DEVELOPMENT_KIT")
2+
set(BOARD_PATH "include/boards/board_explorer_8_development_kit")
3+
set(MCU_CARD FALSE)
4+
set(PIM_SOCKET TRUE)
5+
set(SHIELD FALSE)
6+
set(DIP_SOCKET TRUE)
7+
endif()
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
/****************************************************************************
2+
**
3+
** Copyright (C) ${COPYRIGHT_YEAR} MikroElektronika d.o.o.
4+
** Contact: https://www.mikroe.com/contact
5+
**
6+
** This file is part of the mikroSDK package
7+
**
8+
** Commercial License Usage
9+
**
10+
** Licensees holding valid commercial NECTO compilers AI licenses may use this
11+
** file in accordance with the commercial license agreement provided with the
12+
** Software or, alternatively, in accordance with the terms contained in
13+
** a written agreement between you and The MikroElektronika Company.
14+
** For licensing terms and conditions see
15+
** https://www.mikroe.com/legal/software-license-agreement.
16+
** For further information use the contact form at
17+
** https://www.mikroe.com/contact.
18+
**
19+
**
20+
** GNU Lesser General Public License Usage
21+
**
22+
** Alternatively, this file may be used for
23+
** non-commercial projects under the terms of the GNU Lesser
24+
** General Public License version 3 as published by the Free Software
25+
** Foundation: https://www.gnu.org/licenses/lgpl-3.0.html.
26+
**
27+
** The above copyright notice and this permission notice shall be
28+
** included in all copies or substantial portions of the Software.
29+
**
30+
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
31+
** OF MERCHANTABILITY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
32+
** TO THE WARRANTIES FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
33+
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
34+
** DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
35+
** OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
36+
** OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37+
**
38+
****************************************************************************/
39+
/*!
40+
* @file board.h
41+
* @brief Main board pin mapping.
42+
*/
43+
44+
#ifndef _BOARD_H_
45+
#define _BOARD_H_
46+
47+
#ifdef __cplusplus
48+
extern "C"
49+
{
50+
#endif
51+
52+
#define BOARD_NAME "Explorer 8 Development Kit"
53+
54+
#include "mikrobus.h"
55+
#ifdef _MSDK_MCU_CARD_NAME_
56+
#include "pim_socket.h"
57+
#else
58+
#include "dip_socket.h"
59+
#endif
60+
61+
// Mapping
62+
#define MIKROBUS_1 1
63+
#define MIKROBUS_2 2
64+
65+
#ifdef _MSDK_MCU_CARD_NAME_
66+
#define MIKROBUS_1_AN PIM_PIN_21
67+
#define MIKROBUS_1_RST PIM_PIN_47
68+
#define MIKROBUS_1_CS PIM_PIN_34
69+
#define MIKROBUS_1_SCK PIM_PIN_44
70+
#define MIKROBUS_1_MISO PIM_PIN_45
71+
#define MIKROBUS_1_MOSI PIM_PIN_46
72+
#define MIKROBUS_1_PWM PIM_PIN_35
73+
#define MIKROBUS_1_INT PIM_PIN_57
74+
#define MIKROBUS_1_RX PIM_PIN_38
75+
#define MIKROBUS_1_TX PIM_PIN_37
76+
#define MIKROBUS_1_SCL PIM_PIN_44
77+
#define MIKROBUS_1_SDA PIM_PIN_43
78+
79+
#define MIKROBUS_2_AN PIM_PIN_04
80+
#define MIKROBUS_2_RST PIM_PIN_63
81+
#define MIKROBUS_2_CS PIM_PIN_78
82+
#define MIKROBUS_2_SCK PIM_PIN_64
83+
#define MIKROBUS_2_MISO PIM_PIN_65
84+
#define MIKROBUS_2_MOSI PIM_PIN_66
85+
#define MIKROBUS_2_PWM PIM_PIN_36
86+
#define MIKROBUS_2_INT PIM_PIN_58
87+
#define MIKROBUS_2_RX PIM_PIN_07
88+
#define MIKROBUS_2_TX PIM_PIN_06
89+
#define MIKROBUS_2_SCL PIM_PIN_44
90+
#define MIKROBUS_2_SDA PIM_PIN_45
91+
92+
#define LED_1 PIM_PIN_72
93+
#define LED_2 PIM_PIN_69
94+
#define LED_3 PIM_PIN_68
95+
#define LED_4 PIM_PIN_67
96+
#define LED_5 PIM_PIN_58
97+
#define LED_6 PIM_PIN_57
98+
#define LED_7 PIM_PIN_56
99+
#define LED_8 PIM_PIN_55
100+
#else
101+
#define MIKROBUS_1_AN MIKROBUS_1_DIP_AN
102+
#define MIKROBUS_1_RST MIKROBUS_1_DIP_RST
103+
#define MIKROBUS_1_CS MIKROBUS_1_DIP_CS
104+
#define MIKROBUS_1_SCK MIKROBUS_1_DIP_SCK
105+
#define MIKROBUS_1_MISO MIKROBUS_1_DIP_MISO
106+
#define MIKROBUS_1_MOSI MIKROBUS_1_DIP_MOSI
107+
#define MIKROBUS_1_PWM MIKROBUS_1_DIP_PWM
108+
#define MIKROBUS_1_INT MIKROBUS_1_DIP_INT
109+
#define MIKROBUS_1_RX MIKROBUS_1_DIP_RX
110+
#define MIKROBUS_1_TX MIKROBUS_1_DIP_TX
111+
#define MIKROBUS_1_SCL MIKROBUS_1_DIP_SCL
112+
#define MIKROBUS_1_SDA MIKROBUS_1_DIP_SDA
113+
114+
#define MIKROBUS_2_AN MIKROBUS_2_DIP_AN
115+
#define MIKROBUS_2_RST MIKROBUS_2_DIP_RST
116+
#define MIKROBUS_2_CS MIKROBUS_2_DIP_CS
117+
#define MIKROBUS_2_SCK MIKROBUS_2_DIP_SCK
118+
#define MIKROBUS_2_MISO MIKROBUS_2_DIP_MISO
119+
#define MIKROBUS_2_MOSI MIKROBUS_2_DIP_MOSI
120+
#define MIKROBUS_2_PWM MIKROBUS_2_DIP_PWM
121+
#define MIKROBUS_2_INT MIKROBUS_2_DIP_INT
122+
#define MIKROBUS_2_RX MIKROBUS_2_DIP_RX
123+
#define MIKROBUS_2_TX MIKROBUS_2_DIP_TX
124+
#define MIKROBUS_2_SCL MIKROBUS_2_DIP_SCL
125+
#define MIKROBUS_2_SDA MIKROBUS_2_DIP_SDA
126+
127+
#ifdef GPIO_PD0
128+
#define LED_1 GPIO_PD0
129+
#endif
130+
#ifdef GPIO_PD1
131+
#define LED_2 GPIO_PD1
132+
#endif
133+
#ifdef GPIO_PD2
134+
#define LED_3 GPIO_PD2
135+
#endif
136+
#ifdef GPIO_PD3
137+
#define LED_4 GPIO_PD3
138+
#endif
139+
#ifdef GPIO_PB0
140+
#define LED_5 GPIO_PB0
141+
#endif
142+
#ifdef GPIO_PB1
143+
#define LED_6 GPIO_PB1
144+
#endif
145+
#ifdef GPIO_PB2
146+
#define LED_7 GPIO_PB2
147+
#endif
148+
#ifdef GPIO_PB3
149+
#define LED_8 GPIO_PB3
150+
#endif
151+
#endif
152+
153+
#ifdef __cplusplus
154+
}
155+
#endif
156+
157+
#endif // _BOARD_H_
158+
// ------------------------------------------------------------------------- END
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
/****************************************************************************
2+
**
3+
** Copyright (C) 2025 MikroElektronika d.o.o.
4+
** Contact: https://www.mikroe.com/contact
5+
**
6+
** This file is part of the mikroSDK package
7+
**
8+
** Commercial License Usage
9+
**
10+
** Licensees holding valid commercial NECTO compilers AI licenses may use this
11+
** file in accordance with the commercial license agreement provided with the
12+
** Software or, alternatively, in accordance with the terms contained in
13+
** a written agreement between you and The MikroElektronika Company.
14+
** For licensing terms and conditions see
15+
** https://www.mikroe.com/legal/software-license-agreement.
16+
** For further information use the contact form at
17+
** https://www.mikroe.com/contact.
18+
**
19+
**
20+
** GNU Lesser General Public License Usage
21+
**
22+
** Alternatively, this file may be used for
23+
** non-commercial projects under the terms of the GNU Lesser
24+
** General Public License version 3 as published by the Free Software
25+
** Foundation: https://www.gnu.org/licenses/lgpl-3.0.html.
26+
**
27+
** The above copyright notice and this permission notice shall be
28+
** included in all copies or substantial portions of the Software.
29+
**
30+
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
31+
** OF MERCHANTABILITY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
32+
** TO THE WARRANTIES FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
33+
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
34+
** DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
35+
** OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
36+
** OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37+
**
38+
****************************************************************************/
39+
/*!
40+
* @file dip_socket.h
41+
* @brief Dip socket mikrobus pin mapping.
42+
*/
43+
44+
#ifndef _DIP_SOCKET_H_
45+
#define _DIP_SOCKET_H_
46+
47+
#ifdef __cplusplus
48+
extern "C"{
49+
#endif
50+
51+
#include "hal_target.h"
52+
53+
// Mapping
54+
#define MIKROBUS_1_DIP_AN GPIO_PA1
55+
#define MIKROBUS_1_DIP_RST // Pin not routed
56+
#define MIKROBUS_1_DIP_CS GPIO_PA4
57+
#define MIKROBUS_1_DIP_SCK // Pin not routed
58+
#define MIKROBUS_1_DIP_MISO // Pin not routed
59+
#define MIKROBUS_1_DIP_MOSI // Pin not routed
60+
#define MIKROBUS_1_DIP_PWM GPIO_PC1
61+
#define MIKROBUS_1_DIP_INT // Pin not routed
62+
#define MIKROBUS_1_DIP_RX GPIO_PC5
63+
#define MIKROBUS_1_DIP_TX GPIO_PC4
64+
#define MIKROBUS_1_DIP_SCL GPIO_PC3
65+
#define MIKROBUS_1_DIP_SDA GPIO_PC4
66+
67+
#define MIKROBUS_2_DIP_AN // Pin not routed
68+
#define MIKROBUS_2_DIP_RST // Pin not routed
69+
#define MIKROBUS_2_DIP_CS // Pin not routed
70+
#define MIKROBUS_2_DIP_SCK GPIO_PC3
71+
#define MIKROBUS_2_DIP_MISO GPIO_PC4
72+
#define MIKROBUS_2_DIP_MOSI GPIO_PC5
73+
#define MIKROBUS_2_DIP_PWM GPIO_PC0
74+
#define MIKROBUS_2_DIP_INT // Pin not routed
75+
#define MIKROBUS_2_DIP_RX // Pin not routed
76+
#define MIKROBUS_2_DIP_TX // Pin not routed
77+
#define MIKROBUS_2_DIP_SCL GPIO_PC3
78+
#define MIKROBUS_2_DIP_SDA GPIO_PC4
79+
80+
#ifdef __cplusplus
81+
}
82+
#endif
83+
84+
#endif // _DIP_SOCKET_H_
85+
// ------------------------------------------------------------------------- END
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
/****************************************************************************
2+
**
3+
** Copyright (C) 2025 MikroElektronika d.o.o.
4+
** Contact: https://www.mikroe.com/contact
5+
**
6+
** This file is part of the mikroSDK package
7+
**
8+
** Commercial License Usage
9+
**
10+
** Licensees holding valid commercial NECTO compilers AI licenses may use this
11+
** file in accordance with the commercial license agreement provided with the
12+
** Software or, alternatively, in accordance with the terms contained in
13+
** a written agreement between you and The MikroElektronika Company.
14+
** For licensing terms and conditions see
15+
** https://www.mikroe.com/legal/software-license-agreement.
16+
** For further information use the contact form at
17+
** https://www.mikroe.com/contact.
18+
**
19+
**
20+
** GNU Lesser General Public License Usage
21+
**
22+
** Alternatively, this file may be used for
23+
** non-commercial projects under the terms of the GNU Lesser
24+
** General Public License version 3 as published by the Free Software
25+
** Foundation: https://www.gnu.org/licenses/lgpl-3.0.html.
26+
**
27+
** The above copyright notice and this permission notice shall be
28+
** included in all copies or substantial portions of the Software.
29+
**
30+
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
31+
** OF MERCHANTABILITY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
32+
** TO THE WARRANTIES FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
33+
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
34+
** DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
35+
** OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
36+
** OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37+
**
38+
****************************************************************************/
39+
/*!
40+
* @file dip_socket.h
41+
* @brief Dip socket mikrobus pin mapping.
42+
*/
43+
44+
#ifndef _DIP_SOCKET_H_
45+
#define _DIP_SOCKET_H_
46+
47+
#ifdef __cplusplus
48+
extern "C"{
49+
#endif
50+
51+
#include "hal_target.h"
52+
53+
// Mapping
54+
#define MIKROBUS_1_DIP_AN GPIO_PA1
55+
#define MIKROBUS_1_DIP_RST GPIO_PB7
56+
#define MIKROBUS_1_DIP_CS GPIO_PA4
57+
#define MIKROBUS_1_DIP_SCK GPIO_PB6
58+
#define MIKROBUS_1_DIP_MISO GPIO_PB4
59+
#define MIKROBUS_1_DIP_MOSI GPIO_PC7
60+
#define MIKROBUS_1_DIP_PWM GPIO_PC1
61+
#define MIKROBUS_1_DIP_INT // Pin not routed
62+
#define MIKROBUS_1_DIP_RX GPIO_PC5
63+
#define MIKROBUS_1_DIP_TX GPIO_PC4
64+
#define MIKROBUS_1_DIP_SCL GPIO_PC3
65+
#define MIKROBUS_1_DIP_SDA GPIO_PC4
66+
67+
#define MIKROBUS_2_DIP_AN // Pin not routed
68+
#define MIKROBUS_2_DIP_RST // Pin not routed
69+
#define MIKROBUS_2_DIP_CS // Pin not routed
70+
#define MIKROBUS_2_DIP_SCK GPIO_PC3
71+
#define MIKROBUS_2_DIP_MISO GPIO_PC4
72+
#define MIKROBUS_2_DIP_MOSI GPIO_PC5
73+
#define MIKROBUS_2_DIP_PWM GPIO_PC0
74+
#define MIKROBUS_2_DIP_INT // Pin not routed
75+
#define MIKROBUS_2_DIP_RX GPIO_PC7
76+
#define MIKROBUS_2_DIP_TX GPIO_PC6
77+
#define MIKROBUS_2_DIP_SCL GPIO_PC3
78+
#define MIKROBUS_2_DIP_SDA GPIO_PC4
79+
80+
#ifdef __cplusplus
81+
}
82+
#endif
83+
84+
#endif // _DIP_SOCKET_H_
85+
// ------------------------------------------------------------------------- END

0 commit comments

Comments
 (0)