ICARUS OS (Intelligent Cooperative Architecture for Real-time Unified Systems)
0.1.0
Preemptive Real-Time Operating System for ARM Cortex-M7
Loading...
Searching...
No Matches
config.h
Go to the documentation of this file.
1
30
#ifndef BSP_CONFIG_H
31
#define BSP_CONFIG_H
32
33
#ifdef __cplusplus
34
extern
"C"
{
35
#endif
36
37
#ifndef HOST_TEST
38
#include "stm32h7xx_hal.h"
39
#else
40
#include "mock_hal.h"
// Include mock HAL types during testing
41
#endif
42
43
/* ============================================================================
44
* SYSTEM CONFIGURATION
45
* ========================================================================= */
46
54
#define BSP_SYSCLK_FREQ 480000000UL
55
57
#define BSP_HCLK_FREQ 240000000UL
58
60
#define BSP_APB1_FREQ 120000000UL
61
63
#define BSP_APB2_FREQ 120000000UL
64
66
#define BSP_SYSTICK_FREQ 1000UL
67
70
/* ============================================================================
71
* GPIO PIN DEFINITIONS
72
* ========================================================================= */
73
80
/* LED (Active High) */
81
#define BSP_LED_PIN GPIO_PIN_3
82
#ifndef HOST_TEST
83
#define BSP_LED_PORT GPIOE
84
#else
85
#define BSP_LED_PORT (&GPIOE)
86
#endif
87
#define BSP_LED_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE()
88
89
/* User Button (Active Low with Pull-Down) */
90
#define BSP_KEY_PIN GPIO_PIN_13
91
#define BSP_KEY_PORT GPIOC
92
#define BSP_KEY_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
93
94
/* LCD SPI Chip Select */
95
#define BSP_LCD_CS_PIN GPIO_PIN_11
96
#define BSP_LCD_CS_PORT GPIOE
97
98
/* LCD Data/Command Select */
99
#define BSP_LCD_DC_PIN GPIO_PIN_13
100
#define BSP_LCD_DC_PORT GPIOE
101
104
/* ============================================================================
105
* PERIPHERAL CONFIGURATION
106
* ========================================================================= */
107
114
/* SPI4 - LCD Interface */
115
#define BSP_LCD_SPI SPI4
116
#define BSP_LCD_SPI_CLK_ENABLE() __HAL_RCC_SPI4_CLK_ENABLE()
117
118
/* I2C2 - IMU Interface */
119
#define BSP_IMU_I2C I2C2
120
#define BSP_IMU_I2C_CLK_ENABLE() __HAL_RCC_I2C2_CLK_ENABLE()
121
#define BSP_IMU_I2C_ADDRESS 0x6B
123
/* TIM1 - PWM Output */
124
#define BSP_PWM_TIM TIM1
125
#define BSP_PWM_TIM_CLK_ENABLE() __HAL_RCC_TIM1_CLK_ENABLE()
126
129
/* ============================================================================
130
* LEGACY COMPATIBILITY DEFINES
131
* ========================================================================= */
132
133
/* Pin names used by STM32CubeMX generated code */
134
#define E3_Pin BSP_LED_PIN
135
#define E3_GPIO_Port BSP_LED_PORT
136
#define KEY_Pin BSP_KEY_PIN
137
#define KEY_GPIO_Port BSP_KEY_PORT
138
#define LCD_CS_Pin BSP_LCD_CS_PIN
139
#define LCD_CS_GPIO_Port BSP_LCD_CS_PORT
140
#define LCD_WR_RS_Pin BSP_LCD_DC_PIN
141
#define LCD_WR_RS_GPIO_Port BSP_LCD_DC_PORT
142
143
#ifdef __cplusplus
144
}
145
#endif
146
147
#endif
/* BSP_CONFIG_H */
Core
Inc
bsp
config.h
Generated on Fri Apr 17 2026 13:48:31 for ICARUS OS (Intelligent Cooperative Architecture for Real-time Unified Systems) by
1.9.8