8
8
******************************************************************************
9
9
* @attention
10
10
*
11
- * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
11
+ * <h2><center>© Copyright (c) 2017 STMicroelectronics.
12
+ * All rights reserved.</center></h2>
12
13
*
13
- * Redistribution and use in source and binary forms, with or without modification,
14
- * are permitted provided that the following conditions are met:
15
- * 1. Redistributions of source code must retain the above copyright notice,
16
- * this list of conditions and the following disclaimer.
17
- * 2. Redistributions in binary form must reproduce the above copyright notice,
18
- * this list of conditions and the following disclaimer in the documentation
19
- * and/or other materials provided with the distribution.
20
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
21
- * may be used to endorse or promote products derived from this software
22
- * without specific prior written permission.
23
- *
24
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
28
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
32
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14
+ * This software component is licensed by ST under BSD 3-Clause license,
15
+ * the "License"; You may not use this file except in compliance with the
16
+ * License. You may obtain a copy of the License at:
17
+ * opensource.org/licenses/BSD-3-Clause
34
18
*
35
19
******************************************************************************
36
20
*/
@@ -53,12 +37,14 @@ extern "C" {
53
37
#define HAL_MODULE_ENABLED
54
38
#define HAL_ADC_MODULE_ENABLED
55
39
#define HAL_CAN_MODULE_ENABLED
40
+ /* #define HAL_CAN_LEGACY_MODULE_ENABLED */
56
41
#define HAL_CEC_MODULE_ENABLED
57
42
#define HAL_CORTEX_MODULE_ENABLED
58
43
#define HAL_CRC_MODULE_ENABLED
59
44
#define HAL_DAC_MODULE_ENABLED
60
45
#define HAL_DMA_MODULE_ENABLED
61
46
#define HAL_ETH_MODULE_ENABLED
47
+ #define HAL_EXTI_MODULE_ENABLED
62
48
#define HAL_FLASH_MODULE_ENABLED
63
49
#define HAL_GPIO_MODULE_ENABLED
64
50
#define HAL_HCD_MODULE_ENABLED
@@ -142,6 +128,30 @@ extern "C" {
142
128
#define USE_RTOS 0U
143
129
#define PREFETCH_ENABLE 1U
144
130
131
+ #define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */
132
+ #define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */
133
+ #define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */
134
+ #define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */
135
+ #define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */
136
+ #define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */
137
+ #define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */
138
+ #define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */
139
+ #define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */
140
+ #define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */
141
+ #define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */
142
+ #define USE_HAL_PCCARD_REGISTER_CALLBACKS 0U /* PCCARD register callback disabled */
143
+ #define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */
144
+ #define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */
145
+ #define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */
146
+ #define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */
147
+ #define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */
148
+ #define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */
149
+ #define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */
150
+ #define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */
151
+ #define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */
152
+ #define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */
153
+ #define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */
154
+
145
155
/* ########################## Assert Selection ############################## */
146
156
/**
147
157
* @brief Uncomment the line below to expanse the "assert_param" macro in the
@@ -164,14 +174,8 @@ extern "C" {
164
174
/* Definition of the Ethernet driver buffers size and count */
165
175
#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */
166
176
#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */
167
-
168
- #ifdef MBED_CONF_STM32_EMAC_ETH_RXBUFNB
169
- #define ETH_RXBUFNB MBED_CONF_STM32_EMAC_ETH_RXBUFNB /* Rx buffers of size ETH_RX_BUF_SIZE */
170
- #endif
171
-
172
- #ifdef MBED_CONF_STM32_EMAC_ETH_TXBUFNB
173
- #define ETH_TXBUFNB MBED_CONF_STM32_EMAC_ETH_TXBUFNB /* Tx buffers of size ETH_TX_BUF_SIZE */
174
- #endif
177
+ #define ETH_RXBUFNB 8U /* 8 Rx buffers of size ETH_RX_BUF_SIZE */
178
+ #define ETH_TXBUFNB 4U /* 4 Tx buffers of size ETH_TX_BUF_SIZE */
175
179
176
180
/* Section 2: PHY configuration section */
177
181
@@ -243,6 +247,10 @@ extern "C" {
243
247
#include "stm32f1xx_hal_gpio.h"
244
248
#endif /* HAL_GPIO_MODULE_ENABLED */
245
249
250
+ #ifdef HAL_EXTI_MODULE_ENABLED
251
+ #include "stm32f1xx_hal_exti.h"
252
+ #endif /* HAL_EXTI_MODULE_ENABLED */
253
+
246
254
#ifdef HAL_DMA_MODULE_ENABLED
247
255
#include "stm32f1xx_hal_dma.h"
248
256
#endif /* HAL_DMA_MODULE_ENABLED */
@@ -255,6 +263,10 @@ extern "C" {
255
263
#include "stm32f1xx_hal_can.h"
256
264
#endif /* HAL_CAN_MODULE_ENABLED */
257
265
266
+ #ifdef HAL_CAN_LEGACY_MODULE_ENABLED
267
+ #include "Legacy/stm32f1xx_hal_can_legacy.h"
268
+ #endif /* HAL_CAN_LEGACY_MODULE_ENABLED */
269
+
258
270
#ifdef HAL_CEC_MODULE_ENABLED
259
271
#include "stm32f1xx_hal_cec.h"
260
272
#endif /* HAL_CEC_MODULE_ENABLED */
@@ -361,19 +373,7 @@ extern "C" {
361
373
362
374
/* Exported macro ------------------------------------------------------------*/
363
375
#ifdef USE_FULL_ASSERT
364
- // MBED patch: all targets use the same assert file
365
- #include "stm32_assert.h"
366
- /**
367
- * @brief The assert_param macro is used for function's parameters check.
368
- * @param expr: If expr is false, it calls assert_failed function
369
- * which reports the name of the source file and the source
370
- * line number of the call that failed.
371
- * If expr is true, it returns no value.
372
- * @retval None
373
- */
374
- //#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
375
- /* Exported functions ------------------------------------------------------- */
376
- //void assert_failed(uint8_t *file, uint32_t line);
376
+ #include "stm32_assert.h" // MBED patch
377
377
#else
378
378
#define assert_param (expr ) ((void)0U)
379
379
#endif /* USE_FULL_ASSERT */
0 commit comments