|
| 1 | +diff --git a/stm32cube/stm32wlxx/CMakeLists.txt b/stm32cube/stm32wlxx/CMakeLists.txt |
| 2 | +new file mode 100644 |
| 3 | +index 0000000..710d396 |
| 4 | +--- /dev/null |
| 5 | ++++ b/stm32cube/stm32wlxx/CMakeLists.txt |
| 6 | +@@ -0,0 +1,73 @@ |
| 7 | ++# Copyright (c) 2020 STMicroelectronics |
| 8 | ++# |
| 9 | ++# SPDX-License-Identifier: Apache-2.0 |
| 10 | ++ |
| 11 | ++zephyr_library_sources(soc/system_stm32wlxx.c) |
| 12 | ++zephyr_library_sources(drivers/src/stm32wlxx_hal.c) |
| 13 | ++zephyr_library_sources(drivers/src/stm32wlxx_hal_rcc.c) |
| 14 | ++zephyr_library_sources(drivers/src/stm32wlxx_hal_rcc_ex.c) |
| 15 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_ADC drivers/src/stm32wlxx_hal_adc.c) |
| 16 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_ADC_EX drivers/src/stm32wlxx_hal_adc_ex.c) |
| 17 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_COMP drivers/src/stm32wlxx_hal_comp.c) |
| 18 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_CORTEX drivers/src/stm32wlxx_hal_cortex.c) |
| 19 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_CRC drivers/src/stm32wlxx_hal_crc.c) |
| 20 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_CRC_EX drivers/src/stm32wlxx_hal_crc_ex.c) |
| 21 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_CRYP drivers/src/stm32wlxx_hal_cryp.c) |
| 22 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_CRYP_EX drivers/src/stm32wlxx_hal_cryp_ex.c) |
| 23 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_DAC drivers/src/stm32wlxx_hal_dac.c) |
| 24 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_DAC_EX drivers/src/stm32wlxx_hal_dac_ex.c) |
| 25 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_DMA drivers/src/stm32wlxx_hal_dma.c) |
| 26 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_DMA_EX drivers/src/stm32wlxx_hal_dma_ex.c) |
| 27 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_EXTI drivers/src/stm32wlxx_hal_exti.c) |
| 28 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_FLASH drivers/src/stm32wlxx_hal_flash.c) |
| 29 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_FLASH_EX drivers/src/stm32wlxx_hal_flash_ex.c) |
| 30 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_GPIO drivers/src/stm32wlxx_hal_gpio.c) |
| 31 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_GTZC drivers/src/stm32wlxx_hal_gtzc.c) |
| 32 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_HSEM drivers/src/stm32wlxx_hal_hsem.c) |
| 33 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_I2C drivers/src/stm32wlxx_hal_i2c.c) |
| 34 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_I2C_EX drivers/src/stm32wlxx_hal_i2c_ex.c) |
| 35 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_I2S drivers/src/stm32wlxx_hal_i2s.c) |
| 36 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_IPCC drivers/src/stm32wlxx_hal_ipcc.c) |
| 37 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_IRDA drivers/src/stm32wlxx_hal_irda.c) |
| 38 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_IWDG drivers/src/stm32wlxx_hal_iwdg.c) |
| 39 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_LPTIM drivers/src/stm32wlxx_hal_lptim.c) |
| 40 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_PKA drivers/src/stm32wlxx_hal_pka.c) |
| 41 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_PWR drivers/src/stm32wlxx_hal_pwr.c) |
| 42 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_PWR_EX drivers/src/stm32wlxx_hal_pwr_ex.c) |
| 43 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_RNG drivers/src/stm32wlxx_hal_rng.c) |
| 44 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_RNG_EX drivers/src/stm32wlxx_hal_rng_ex.c) |
| 45 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_RTC drivers/src/stm32wlxx_hal_rtc.c) |
| 46 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_RTC_EX drivers/src/stm32wlxx_hal_rtc_ex.c) |
| 47 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_SMARTCARD drivers/src/stm32wlxx_hal_smartcard.c) |
| 48 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_SMARTCARD_EX drivers/src/stm32wlxx_hal_smartcard_ex.c) |
| 49 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_SMBUS drivers/src/stm32wlxx_hal_smbus.c) |
| 50 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_SMBUS_EX drivers/src/stm32wlxx_hal_smbus_ex.c) |
| 51 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_SPI drivers/src/stm32wlxx_hal_spi.c) |
| 52 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_SPI_EX drivers/src/stm32wlxx_hal_spi_ex.c) |
| 53 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_SUBGHZ drivers/src/stm32wlxx_hal_subghz.c) |
| 54 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_TIM drivers/src/stm32wlxx_hal_tim.c) |
| 55 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_TIM_EX drivers/src/stm32wlxx_hal_tim_ex.c) |
| 56 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_UART drivers/src/stm32wlxx_hal_uart.c) |
| 57 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_UART_EX drivers/src/stm32wlxx_hal_uart_ex.c) |
| 58 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_USART drivers/src/stm32wlxx_hal_usart.c) |
| 59 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_USART_EX drivers/src/stm32wlxx_hal_usart_ex.c) |
| 60 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_HAL_WWDG drivers/src/stm32wlxx_hal_wwdg.c) |
| 61 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_ADC drivers/src/stm32wlxx_ll_adc.c) |
| 62 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_COMP drivers/src/stm32wlxx_ll_comp.c) |
| 63 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_CRC drivers/src/stm32wlxx_ll_crc.c) |
| 64 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_DAC drivers/src/stm32wlxx_ll_dac.c) |
| 65 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_DMA drivers/src/stm32wlxx_ll_dma.c) |
| 66 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_EXTI drivers/src/stm32wlxx_ll_exti.c) |
| 67 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_GPIO drivers/src/stm32wlxx_ll_gpio.c) |
| 68 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_I2C drivers/src/stm32wlxx_ll_i2c.c) |
| 69 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_LPTIM drivers/src/stm32wlxx_ll_lptim.c) |
| 70 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_LPUART drivers/src/stm32wlxx_ll_lpuart.c) |
| 71 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_PKA drivers/src/stm32wlxx_ll_pka.c) |
| 72 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_PWR drivers/src/stm32wlxx_ll_pwr.c) |
| 73 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_RCC drivers/src/stm32wlxx_ll_rcc.c) |
| 74 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_RNG drivers/src/stm32wlxx_ll_rng.c) |
| 75 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_RTC drivers/src/stm32wlxx_ll_rtc.c) |
| 76 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_SPI drivers/src/stm32wlxx_ll_spi.c) |
| 77 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_TIM drivers/src/stm32wlxx_ll_tim.c) |
| 78 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_USART drivers/src/stm32wlxx_ll_usart.c) |
| 79 | ++zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_UTILS drivers/src/stm32wlxx_ll_utils.c) |
| 80 | +diff --git a/stm32cube/stm32wlxx/LICENSE.md b/stm32cube/stm32wlxx/LICENSE.md |
| 81 | +new file mode 100644 |
| 82 | +index 0000000..4a464d0 |
| 83 | +--- /dev/null |
| 84 | ++++ b/stm32cube/stm32wlxx/LICENSE.md |
| 85 | +@@ -0,0 +1,27 @@ |
| 86 | ++Copyright 2022 STMicroelectronics. |
| 87 | ++All rights reserved. |
| 88 | ++ |
| 89 | ++Redistribution and use in source and binary forms, with or without modification, |
| 90 | ++are permitted provided that the following conditions are met: |
| 91 | ++ |
| 92 | ++1. Redistributions of source code must retain the above copyright notice, this |
| 93 | ++list of conditions and the following disclaimer. |
| 94 | ++ |
| 95 | ++2. Redistributions in binary form must reproduce the above copyright notice, |
| 96 | ++this list of conditions and the following disclaimer in the documentation and/or |
| 97 | ++other materials provided with the distribution. |
| 98 | ++ |
| 99 | ++3. Neither the name of the copyright holder nor the names of its contributors |
| 100 | ++may be used to endorse or promote products derived from this software without |
| 101 | ++specific prior written permission. |
| 102 | ++ |
| 103 | ++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
| 104 | ++ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 105 | ++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 106 | ++DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR |
| 107 | ++ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 108 | ++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 109 | ++LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
| 110 | ++ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 111 | ++(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 112 | ++SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 113 | +diff --git a/stm32cube/stm32wlxx/README b/stm32cube/stm32wlxx/README |
| 114 | +new file mode 100644 |
| 115 | +index 0000000..d629b0e |
| 116 | +--- /dev/null |
| 117 | ++++ b/stm32cube/stm32wlxx/README |
| 118 | +@@ -0,0 +1,63 @@ |
| 119 | ++STM32CubeWB |
| 120 | ++########### |
| 121 | ++ |
| 122 | ++Origin: |
| 123 | ++ ST Microelectronics |
| 124 | ++ http://www.st.com/en/embedded-software/stm32cubewb.html |
| 125 | ++ |
| 126 | ++Status: |
| 127 | ++ version v1.3.0 |
| 128 | ++ |
| 129 | ++Purpose: |
| 130 | ++ ST Microelectronics official MCU package for STM32WL series. |
| 131 | ++ |
| 132 | ++Description: |
| 133 | ++ This package is an extract of official STM32CubeWL package written by ST Microelectronics. |
| 134 | ++ It is composed of STM32Cube hardware abstraction layer (HAL) and low layer (LL) plus a set |
| 135 | ++ of CMSIS headers files, one for each SoC in STM32WL series. |
| 136 | ++ |
| 137 | ++Dependencies: |
| 138 | ++ None. |
| 139 | ++ |
| 140 | ++URL: |
| 141 | ++ https://github.com/STMicroelectronics/STM32CubeWL |
| 142 | ++ |
| 143 | ++Commit: |
| 144 | ++ 378e461e469ef9826e857f8eda3346cea525b2fa |
| 145 | ++ |
| 146 | ++Maintained-by: |
| 147 | ++ External |
| 148 | ++ |
| 149 | ++License: |
| 150 | ++ BSD-3-Clause |
| 151 | ++ |
| 152 | ++License Link: |
| 153 | ++ https://opensource.org/licenses/BSD-3-Clause |
| 154 | ++ |
| 155 | ++Patch List: |
| 156 | ++ *Changes from official delivery: |
| 157 | ++ -dos2unix applied |
| 158 | ++ -trailing white spaces removed |
| 159 | ++ |
| 160 | ++ *Provision to enable hal & ll asserts added |
| 161 | ++ -Added stm32cube/stm32wlxx/drivers/include/stm32_assert.h |
| 162 | ++ -Removed unused stm32cube/stm32wlxx/drivers/include/stm32_assert_template.h |
| 163 | ++ |
| 164 | ++ *Disable SUBGHZ HAL |
| 165 | ++ -Disable the SUBGHZ HAL module to avoid conflict with the Zephyr sx1262 |
| 166 | ++ register definitions. |
| 167 | ++ Impacted files: |
| 168 | ++ drivers/include/stm32wlxx_hal_conf.h |
| 169 | ++ |
| 170 | ++ *Wrap define UNUSED with an ifndef |
| 171 | ++ This will prevent a compiler warning for the case the UNUSED macro |
| 172 | ++ is already defined elsewhere in the project |
| 173 | ++ Impacted files: |
| 174 | ++ drivers/include/stm32wlxx_hal_def.h |
| 175 | ++ ST Internal Reference: 136825 |
| 176 | ++ |
| 177 | ++ *Fix to remove PAGESIZE definition which conflicts with POSIX |
| 178 | ++ Impacted files: |
| 179 | ++ drivers/include/Legacy/stm32_hal_legacy.h |
| 180 | ++ |
| 181 | ++ See release_note.html from STM32Cube |
| 182 | +diff --git a/stm32cube/stm32wlxx/drivers/include/Legacy/stm32_hal_legacy.h b/stm32cube/stm32wlxx/drivers/include/Legacy/stm32_hal_legacy.h |
| 183 | +index 9f733d1..2769589 100644 |
| 184 | +--- a/stm32cube/stm32wlxx/drivers/include/Legacy/stm32_hal_legacy.h |
| 185 | ++++ b/stm32cube/stm32wlxx/drivers/include/Legacy/stm32_hal_legacy.h |
| 186 | +@@ -463,7 +463,7 @@ extern "C" { |
| 187 | + #define TYPEPROGRAMDATA_FASTBYTE FLASH_TYPEPROGRAMDATA_FASTBYTE |
| 188 | + #define TYPEPROGRAMDATA_FASTHALFWORD FLASH_TYPEPROGRAMDATA_FASTHALFWORD |
| 189 | + #define TYPEPROGRAMDATA_FASTWORD FLASH_TYPEPROGRAMDATA_FASTWORD |
| 190 | +-#define PAGESIZE FLASH_PAGE_SIZE |
| 191 | ++/* #define PAGESIZE FLASH_PAGE_SIZE */ |
| 192 | + #define TYPEPROGRAM_FASTBYTE FLASH_TYPEPROGRAM_BYTE |
| 193 | + #define TYPEPROGRAM_FASTHALFWORD FLASH_TYPEPROGRAM_HALFWORD |
| 194 | + #define TYPEPROGRAM_FASTWORD FLASH_TYPEPROGRAM_WORD |
| 195 | +diff --git a/stm32cube/stm32wlxx/drivers/include/stm32_assert.h b/stm32cube/stm32wlxx/drivers/include/stm32_assert.h |
| 196 | +new file mode 100644 |
| 197 | +index 0000000..38988a7 |
| 198 | +--- /dev/null |
| 199 | ++++ b/stm32cube/stm32wlxx/drivers/include/stm32_assert.h |
| 200 | +@@ -0,0 +1,6 @@ |
| 201 | ++/* |
| 202 | ++ * SPDX-License-Identifier: Apache-2.0 |
| 203 | ++ * Copyright (c) 2021 STMicroelectronics |
| 204 | ++ */ |
| 205 | ++ |
| 206 | ++#include <stm32wlxx_hal_conf.h> |
| 207 | +diff --git a/stm32cube/stm32wlxx/drivers/include/stm32_assert_template.h b/stm32cube/stm32wlxx/drivers/include/stm32_assert_template.h |
| 208 | +deleted file mode 100644 |
| 209 | +index 91e5e6d..0000000 |
| 210 | +--- a/stm32cube/stm32wlxx/drivers/include/stm32_assert_template.h |
| 211 | ++++ /dev/null |
| 212 | +@@ -1,53 +0,0 @@ |
| 213 | +-/** |
| 214 | +- ****************************************************************************** |
| 215 | +- * @file stm32_assert.h |
| 216 | +- * @author MCD Application Team |
| 217 | +- * @brief STM32 assert template file. |
| 218 | +- * This file should be copied to the application folder and renamed |
| 219 | +- * to stm32_assert.h. |
| 220 | +- ****************************************************************************** |
| 221 | +- * @attention |
| 222 | +- * |
| 223 | +- * Copyright (c) 2020 STMicroelectronics. |
| 224 | +- * All rights reserved. |
| 225 | +- * |
| 226 | +- * This software is licensed under terms that can be found in the LICENSE file |
| 227 | +- * in the root directory of this software component. |
| 228 | +- * If no LICENSE file comes with this software, it is provided AS-IS. |
| 229 | +- * |
| 230 | +- ****************************************************************************** |
| 231 | +- */ |
| 232 | +- |
| 233 | +-/* Define to prevent recursive inclusion -------------------------------------*/ |
| 234 | +-#ifndef __STM32_ASSERT_H |
| 235 | +-#define __STM32_ASSERT_H |
| 236 | +- |
| 237 | +-#ifdef __cplusplus |
| 238 | +- extern "C" { |
| 239 | +-#endif |
| 240 | +- |
| 241 | +-/* Exported types ------------------------------------------------------------*/ |
| 242 | +-/* Exported constants --------------------------------------------------------*/ |
| 243 | +-/* Includes ------------------------------------------------------------------*/ |
| 244 | +-/* Exported macro ------------------------------------------------------------*/ |
| 245 | +-#ifdef USE_FULL_ASSERT |
| 246 | +-/** |
| 247 | +- * @brief The assert_param macro is used for function's parameters check. |
| 248 | +- * @param expr If expr is false, it calls assert_failed function |
| 249 | +- * which reports the name of the source file and the source |
| 250 | +- * line number of the call that failed. |
| 251 | +- * If expr is true, it returns no value. |
| 252 | +- * @retval None |
| 253 | +- */ |
| 254 | +- #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) |
| 255 | +-/* Exported functions ------------------------------------------------------- */ |
| 256 | +- void assert_failed(uint8_t* file, uint32_t line); |
| 257 | +-#else |
| 258 | +- #define assert_param(expr) ((void)0U) |
| 259 | +-#endif /* USE_FULL_ASSERT */ |
| 260 | +- |
| 261 | +-#ifdef __cplusplus |
| 262 | +-} |
| 263 | +-#endif |
| 264 | +- |
| 265 | +-#endif /* __STM32_ASSERT_H */ |
| 266 | +diff --git a/stm32cube/stm32wlxx/drivers/include/stm32wlxx_hal_conf.h b/stm32cube/stm32wlxx/drivers/include/stm32wlxx_hal_conf.h |
| 267 | +index 0f620a0..e01c120 100644 |
| 268 | +--- a/stm32cube/stm32wlxx/drivers/include/stm32wlxx_hal_conf.h |
| 269 | ++++ b/stm32cube/stm32wlxx/drivers/include/stm32wlxx_hal_conf.h |
| 270 | +@@ -51,7 +51,6 @@ |
| 271 | + #define HAL_SMARTCARD_MODULE_ENABLED |
| 272 | + #define HAL_SMBUS_MODULE_ENABLED |
| 273 | + #define HAL_SPI_MODULE_ENABLED |
| 274 | +-#define HAL_SUBGHZ_MODULE_ENABLED |
| 275 | + #define HAL_TIM_MODULE_ENABLED |
| 276 | + #define HAL_UART_MODULE_ENABLED |
| 277 | + #define HAL_USART_MODULE_ENABLED |
| 278 | +diff --git a/stm32cube/stm32wlxx/drivers/include/stm32wlxx_hal_def.h b/stm32cube/stm32wlxx/drivers/include/stm32wlxx_hal_def.h |
| 279 | +index a25b967..a562c07 100644 |
| 280 | +--- a/stm32cube/stm32wlxx/drivers/include/stm32wlxx_hal_def.h |
| 281 | ++++ b/stm32cube/stm32wlxx/drivers/include/stm32wlxx_hal_def.h |
| 282 | +@@ -54,7 +54,9 @@ typedef enum |
| 283 | + |
| 284 | + /* Exported macros -----------------------------------------------------------*/ |
| 285 | + |
| 286 | +-#define UNUSED(X) (void)X /* To avoid gcc/g++ warnings */ |
| 287 | ++#ifndef UNUSED |
| 288 | ++ #define UNUSED(X) (void)X /* To avoid gcc/g++ warnings */ |
| 289 | ++#endif |
| 290 | + |
| 291 | + #define HAL_MAX_DELAY 0xFFFFFFFFU |
| 292 | + |
0 commit comments