Skip to content

Commit 47a25e5

Browse files
committed
stm32cube: update stm32wl to cube version V1.3.1
Update Cube version for STM32WLxx series on https://github.com/STMicroelectronics from version v1.3.0 to version v1.3.1 Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
1 parent 9de2009 commit 47a25e5

23 files changed

+1216
-469
lines changed

module_stm32wl.patch

Lines changed: 292 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,292 @@
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+

stm32cube/stm32wlxx/README

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Origin:
66
http://www.st.com/en/embedded-software/stm32cubewb.html
77

88
Status:
9-
version v1.3.0
9+
version v1.3.1
1010

1111
Purpose:
1212
ST Microelectronics official MCU package for STM32WL series.
@@ -23,7 +23,7 @@ URL:
2323
https://github.com/STMicroelectronics/STM32CubeWL
2424

2525
Commit:
26-
378e461e469ef9826e857f8eda3346cea525b2fa
26+
9d77b66f25362a849ef48fd2369060e3718fc99d
2727

2828
Maintained-by:
2929
External
@@ -35,6 +35,7 @@ License Link:
3535
https://opensource.org/licenses/BSD-3-Clause
3636

3737
Patch List:
38+
--> please check that the following list is still valid:
3839
*Changes from official delivery:
3940
-dos2unix applied
4041
-trailing white spaces removed

stm32cube/stm32wlxx/drivers/include/Legacy/stm32_hal_legacy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,7 @@ extern "C" {
12911291
#define TIM_TIM3_TI1_COMP1COMP2_OUT TIM_TIM3_TI1_COMP1_COMP2
12921292
#endif
12931293

1294-
#if defined(STM32U5) || defined(STM32MP2)
1294+
#if defined(STM32U5)
12951295
#define OCREF_CLEAR_SELECT_Pos OCREF_CLEAR_SELECT_POS
12961296
#define OCREF_CLEAR_SELECT_Msk OCREF_CLEAR_SELECT_MSK
12971297
#endif

stm32cube/stm32wlxx/drivers/include/stm32wlxx_hal_cortex.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,8 @@ void HAL_SYSTICK_Callback(void);
308308
#if (__MPU_PRESENT == 1U)
309309
void HAL_MPU_Enable(uint32_t MPU_Control);
310310
void HAL_MPU_Disable(void);
311+
void HAL_MPU_EnableRegion(uint32_t RegionNumber);
312+
void HAL_MPU_DisableRegion(uint32_t RegionNumber);
311313
void HAL_MPU_ConfigRegion(MPU_Region_InitTypeDef *MPU_Init);
312314
#endif /* __MPU_PRESENT */
313315
/**

stm32cube/stm32wlxx/drivers/include/stm32wlxx_hal_i2c.h

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,13 @@ typedef struct __I2C_HandleTypeDef
203203
HAL_StatusTypeDef(*XferISR)(struct __I2C_HandleTypeDef *hi2c, uint32_t ITFlags, uint32_t ITSources);
204204
/*!< I2C transfer IRQ handler function pointer */
205205

206+
#if defined(HAL_DMA_MODULE_ENABLED)
206207
DMA_HandleTypeDef *hdmatx; /*!< I2C Tx DMA handle parameters */
207208

208209
DMA_HandleTypeDef *hdmarx; /*!< I2C Rx DMA handle parameters */
209210

211+
#endif /*HAL_DMA_MODULE_ENABLED*/
212+
210213
HAL_LockTypeDef Lock; /*!< I2C locking object */
211214

212215
__IO HAL_I2C_StateTypeDef State; /*!< I2C communication state */
@@ -661,6 +664,7 @@ HAL_StatusTypeDef HAL_I2C_EnableListen_IT(I2C_HandleTypeDef *hi2c);
661664
HAL_StatusTypeDef HAL_I2C_DisableListen_IT(I2C_HandleTypeDef *hi2c);
662665
HAL_StatusTypeDef HAL_I2C_Master_Abort_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress);
663666

667+
#if defined(HAL_DMA_MODULE_ENABLED)
664668
/******* Non-Blocking mode: DMA */
665669
HAL_StatusTypeDef HAL_I2C_Master_Transmit_DMA(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData,
666670
uint16_t Size);
@@ -681,6 +685,7 @@ HAL_StatusTypeDef HAL_I2C_Slave_Seq_Transmit_DMA(I2C_HandleTypeDef *hi2c, uint8_
681685
uint32_t XferOptions);
682686
HAL_StatusTypeDef HAL_I2C_Slave_Seq_Receive_DMA(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size,
683687
uint32_t XferOptions);
688+
#endif /*HAL_DMA_MODULE_ENABLED*/
684689
/**
685690
* @}
686691
*/
@@ -709,9 +714,9 @@ void HAL_I2C_AbortCpltCallback(I2C_HandleTypeDef *hi2c);
709714
* @{
710715
*/
711716
/* Peripheral State, Mode and Error functions *********************************/
712-
HAL_I2C_StateTypeDef HAL_I2C_GetState(I2C_HandleTypeDef *hi2c);
713-
HAL_I2C_ModeTypeDef HAL_I2C_GetMode(I2C_HandleTypeDef *hi2c);
714-
uint32_t HAL_I2C_GetError(I2C_HandleTypeDef *hi2c);
717+
HAL_I2C_StateTypeDef HAL_I2C_GetState(const I2C_HandleTypeDef *hi2c);
718+
HAL_I2C_ModeTypeDef HAL_I2C_GetMode(const I2C_HandleTypeDef *hi2c);
719+
uint32_t HAL_I2C_GetError(const I2C_HandleTypeDef *hi2c);
715720

716721
/**
717722
* @}
@@ -804,8 +809,8 @@ uint32_t HAL_I2C_GetError(I2C_HandleTypeDef *hi2c);
804809
(I2C_CR2_START) | (I2C_CR2_AUTOEND)) & \
805810
(~I2C_CR2_RD_WRN)) : \
806811
(uint32_t)((((uint32_t)(__ADDRESS__) & (I2C_CR2_SADD)) | \
807-
(I2C_CR2_ADD10) | (I2C_CR2_START)) & \
808-
(~I2C_CR2_RD_WRN)))
812+
(I2C_CR2_ADD10) | (I2C_CR2_START) | \
813+
(I2C_CR2_AUTOEND)) & (~I2C_CR2_RD_WRN)))
809814

810815
#define I2C_CHECK_FLAG(__ISR__, __FLAG__) ((((__ISR__) & ((__FLAG__) & I2C_FLAG_MASK)) == \
811816
((__FLAG__) & I2C_FLAG_MASK)) ? SET : RESET)

0 commit comments

Comments
 (0)