11/**
22 ******************************************************************************
33 * @file stm32h7xx_hal_conf_template.h
4+ * @author MCD Application Team
45 * @brief HAL configuration template file.
56 * This file should be copied to the application folder and renamed
67 * to stm32h7xx_hal_conf.h.
@@ -45,7 +46,9 @@ extern "C" {
4546/* #define HAL_DFSDM_MODULE_ENABLED */
4647#define HAL_DMA_MODULE_ENABLED
4748/* #define HAL_DMA2D_MODULE_ENABLED */
49+ /* #define HAL_DSI_MODULE_ENABLED */
4850#define HAL_ETH_MODULE_ENABLED
51+ /* #define HAL_EXTI_MODULE_ENABLED */
4952/* #define HAL_FDCAN_MODULE_ENABLED */
5053#define HAL_FLASH_MODULE_ENABLED
5154#define HAL_GPIO_MODULE_ENABLED
@@ -69,6 +72,7 @@ extern "C" {
6972/* #define HAL_PCD_MODULE_ENABLED */
7073#define HAL_PWR_MODULE_ENABLED
7174/* #define HAL_QSPI_MODULE_ENABLED */
75+ /* #define HAL_RAMECC_MODULE_ENABLED */
7276#define HAL_RCC_MODULE_ENABLED
7377/* #define HAL_RNG_MODULE_ENABLED */
7478#define HAL_RTC_MODULE_ENABLED
@@ -117,15 +121,6 @@ extern "C" {
117121#define HSI_VALUE ((uint32_t)64000000) /*!< Value of the Internal oscillator in Hz*/
118122#endif /* HSI_VALUE */
119123
120- /**
121- * @brief Internal Low Speed oscillator (LSI) value.
122- */
123- #if !defined (LSI_VALUE )
124- #define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/
125- #endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
126- The real value may vary depending on the variations
127- in voltage and temperature. */
128-
129124/**
130125 * @brief External Low Speed oscillator (LSE) value.
131126 * This value is used by the UART, RTC HAL module to compute the system frequency
@@ -139,6 +134,11 @@ in voltage and temperature. */
139134#define LSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for LSE start up, in ms */
140135#endif /* LSE_STARTUP_TIMEOUT */
141136
137+ #if !defined (LSI_VALUE )
138+ #define LSI_VALUE ((uint32_t)32000) /*!< LSI Typical Value in Hz*/
139+ #endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
140+ The real value may vary depending on the variations
141+ in voltage and temperature.*/
142142/**
143143 * @brief External clock source for I2S peripheral
144144 * This value is used by the I2S HAL module to compute the I2S clock source
@@ -168,6 +168,7 @@ in voltage and temperature. */
168168#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */
169169#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */
170170#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */
171+ #define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */
171172#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */
172173#define USE_HAL_FDCAN_REGISTER_CALLBACKS 0U /* FDCAN register callback disabled */
173174#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */
@@ -195,68 +196,18 @@ in voltage and temperature. */
195196#define USE_HAL_SWPMI_REGISTER_CALLBACKS 0U /* SWPMI register callback disabled */
196197#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */
197198#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */
199+
198200/* ########################### Ethernet Configuration ######################### */
199201#define ETH_TX_DESC_CNT 4 /* number of Ethernet Tx DMA descriptors */
200202#define ETH_RX_DESC_CNT 4 /* number of Ethernet Rx DMA descriptors */
201203
202- /* Section 1 : Ethernet peripheral configuration */
203-
204- /* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */
205204#define ETH_MAC_ADDR0 ((uint8_t)0x02)
206205#define ETH_MAC_ADDR1 ((uint8_t)0x00)
207206#define ETH_MAC_ADDR2 ((uint8_t)0x00)
208207#define ETH_MAC_ADDR3 ((uint8_t)0x00)
209208#define ETH_MAC_ADDR4 ((uint8_t)0x00)
210209#define ETH_MAC_ADDR5 ((uint8_t)0x00)
211210
212- /* Definition of the Ethernet driver buffers size and count */
213- #define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */
214- #define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */
215- #define ETH_RXBUFNB (5U) /* 5 Rx buffers of size ETH_RX_BUF_SIZE */
216- #define ETH_TXBUFNB (5U) /* 5 Tx buffers of size ETH_TX_BUF_SIZE */
217-
218- /* Section 2: PHY configuration section */
219- /* LAN8742A PHY Address*/
220- #define LAN8742A_PHY_ADDRESS 0x00U
221- /* PHY Reset delay these values are based on a 1 ms Systick interrupt*/
222- #define PHY_RESET_DELAY 0x000000FFU
223- /* PHY Configuration delay */
224- #define PHY_CONFIG_DELAY 0x00000FFFU
225-
226- #define PHY_READ_TO 0x0000FFFFU
227- #define PHY_WRITE_TO 0x0000FFFFU
228-
229- /* Section 3: Common PHY Registers */
230-
231- #define PHY_BCR ((uint16_t)0x0000) /*!< Transceiver Basic Control Register */
232- #define PHY_BSR ((uint16_t)0x0001) /*!< Transceiver Basic Status Register */
233-
234- #define PHY_RESET ((uint16_t)0x8000) /*!< PHY Reset */
235- #define PHY_LOOPBACK ((uint16_t)0x4000) /*!< Select loop-back mode */
236- #define PHY_FULLDUPLEX_100M ((uint16_t)0x2100) /*!< Set the full-duplex mode at 100 Mb/s */
237- #define PHY_HALFDUPLEX_100M ((uint16_t)0x2000) /*!< Set the half-duplex mode at 100 Mb/s */
238- #define PHY_FULLDUPLEX_10M ((uint16_t)0x0100) /*!< Set the full-duplex mode at 10 Mb/s */
239- #define PHY_HALFDUPLEX_10M ((uint16_t)0x0000) /*!< Set the half-duplex mode at 10 Mb/s */
240- #define PHY_AUTONEGOTIATION ((uint16_t)0x1000) /*!< Enable auto-negotiation function */
241- #define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200) /*!< Restart auto-negotiation function */
242- #define PHY_POWERDOWN ((uint16_t)0x0800) /*!< Select the power down mode */
243- #define PHY_ISOLATE ((uint16_t)0x0400) /*!< Isolate PHY from MII */
244-
245- #define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020) /*!< Auto-Negotiation process completed */
246- #define PHY_LINKED_STATUS ((uint16_t)0x0004) /*!< Valid link established */
247- #define PHY_JABBER_DETECTION ((uint16_t)0x0002) /*!< Jabber condition detected */
248-
249- /* Section 4: Extended PHY Registers */
250-
251- #define PHY_SR ((uint16_t)0x1F) /*!< PHY special control/ status register Offset */
252-
253- #define PHY_SPEED_STATUS ((uint16_t)0x0004) /*!< PHY Speed mask */
254- #define PHY_DUPLEX_STATUS ((uint16_t)0x0010) /*!< PHY Duplex mask */
255-
256-
257- #define PHY_ISFR ((uint16_t)0x1D) /*!< PHY Interrupt Source Flag register Offset */
258- #define PHY_IMR ((uint16_t)0x1E) /*!< PHY Interrupt Mask register Offset */
259- #define PHY_ISFR_INT4 ((uint16_t)0x0010) /*!< PHY Link down inturrupt */
260211
261212/* ########################## Assert Selection ############################## */
262213/**
@@ -265,16 +216,6 @@ in voltage and temperature. */
265216 */
266217/* #define USE_FULL_ASSERT 1 */
267218
268- /* ################## SPI peripheral configuration ########################## */
269- /**
270- * @brief Used to activate CRC feature inside HAL SPI Driver
271- * Activated (1U): CRC code is compiled within HAL SPI driver
272- * Deactivated (0U): CRC code excluded from HAL SPI driver
273- */
274-
275- #define USE_SPI_CRC 0U
276-
277-
278219/* Includes ------------------------------------------------------------------*/
279220/**
280221 * @brief Include module's header file
@@ -308,6 +249,10 @@ in voltage and temperature. */
308249#include "stm32h7xx_hal_dma2d.h"
309250#endif /* HAL_DMA2D_MODULE_ENABLED */
310251
252+ #ifdef HAL_DSI_MODULE_ENABLED
253+ #include "stm32h7xx_hal_dsi.h"
254+ #endif /* HAL_DSI_MODULE_ENABLED */
255+
311256#ifdef HAL_DFSDM_MODULE_ENABLED
312257#include "stm32h7xx_hal_dfsdm.h"
313258#endif /* HAL_DFSDM_MODULE_ENABLED */
@@ -502,11 +447,11 @@ in voltage and temperature. */
502447 * If expr is true, it returns no value.
503448 * @retval None
504449 */
505- #define assert_param (expr ) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
450+ #define assert_param (expr ) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
506451/* Exported functions ------------------------------------------------------- */
507452void assert_failed (uint8_t * file , uint32_t line );
508453#else
509- #define assert_param (expr ) ((void)0 )
454+ #define assert_param (expr ) ((void)0U )
510455#endif /* USE_FULL_ASSERT */
511456
512457#ifdef __cplusplus
0 commit comments