Skip to content

Commit f6fca07

Browse files
committed
Made Nucleo Pin assignment defintion similar to how manager.hpp assigns samples per mcu
1 parent 2cd8c67 commit f6fca07

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed

cmake/evt-core_compiler.cmake

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,15 @@ option(USE_RTOS "Determines whether or not to compile the RTOS." OFF)
2323
if(TARGET_DEV STREQUAL "STM32F302x8")
2424
add_compile_definitions(STM32F302x8)
2525
add_compile_definitions(STM32F3xx)
26-
add_compile_definitions(NUCLEO_SUPPORT)
2726
elseif(TARGET_DEV STREQUAL "STM32F334x8")
2827
add_compile_definitions(STM32F334x8)
2928
add_compile_definitions(STM32F3xx)
30-
add_compile_definitions(NUCLEO_SUPPORT)
3129
elseif(TARGET_DEV STREQUAL "STM32F446xx")
3230
add_compile_definitions(STM32F446xx)
3331
add_compile_definitions(STM32F4xx)
34-
add_compile_definitions(NUCLEO_SUPPORT)
3532
elseif(TARGET_DEV STREQUAL "STM32F469xx")
3633
add_compile_definitions(STM32F469xx)
3734
add_compile_definitions(STM32F4xx)
38-
add_compile_definitions(HAS_PORT_D)
39-
add_compile_definitions(HAS_PORT_E)
40-
add_compile_definitions(HAS_PORT_F)
41-
add_compile_definitions(HAS_PORT_H)
42-
add_compile_definitions(HAS_PORT_I)
4335
else()
4436
message(FATAL_ERROR "The target device is not supported")
4537
endif()

include/core/io/pin.hpp

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,31 @@
44
* for
55
*/
66
#ifndef _EVT_PIN_
7-
#define _EVT_PIN_
7+
#define _EVT_PIN
8+
9+
#ifdef STM32F303x8
10+
#define NUCLEO_SUPPORT
11+
#endif
12+
13+
#ifdef STM32F334x8
14+
#define NUCLEO_SUPPORT
15+
#endif
16+
17+
#ifdef STM32F446xx
18+
#define NUCLEO_SUPPORT
19+
#endif
20+
21+
#ifdef STM32F469xx
22+
#define HAS_PORT_D
23+
#define HAS_PORT_E
24+
#define HAS_PORT_F
25+
#define HAS_PORT_H
26+
#define HAS_PORT_I
27+
#endif
828

929
namespace core::io {
1030

31+
1132
/**
1233
* Pin mapping information. These values are generated via a combination of the GPIO bank that
1334
* the pin is on and the number of the pin. We referenced MBed's documentation for generating
@@ -67,7 +88,6 @@ enum class Pin {
6788
PC_14 = 0x2E,
6889
PC_15 = 0x2F,
6990

70-
7191
#ifdef HAS_PORT_D
7292
PD_0 = 0x30,
7393
PD_1 = 0x31,

0 commit comments

Comments
 (0)