Skip to content

Commit 41b038a

Browse files
committed
TARGET_STM: rework hal_sleep management to be compatible with all STM32 families
1 parent e83a8ab commit 41b038a

File tree

12 files changed

+27
-3
lines changed

12 files changed

+27
-3
lines changed

targets/TARGET_STM/TARGET_STM32F0/common_objects.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "PinNames.h"
3737
#include "stm32f0xx_ll_usart.h"
3838
#include "stm32f0xx_ll_tim.h"
39+
#include "stm32f0xx_ll_pwr.h"
3940

4041
#ifdef __cplusplus
4142
extern "C" {
@@ -119,6 +120,13 @@ struct analogin_s {
119120
uint8_t channel;
120121
};
121122

123+
124+
#ifdef CRC_PROG_POLYNOMIAL_SUPPORT
125+
#define HAL_CRC_IS_SUPPORTED(polynomial, width) ((width) == 7 || (width) == 8 || (width) == 16 || (width) == 32)
126+
#else
127+
#define HAL_CRC_IS_SUPPORTED(polynomial, width) ((width) == 32 && (polynomial) == 0x04C11DB7)
128+
#endif
129+
122130
#include "gpio_object.h"
123131

124132
#if DEVICE_ANALOGOUT

targets/TARGET_STM/TARGET_STM32F1/common_objects.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "PinNames.h"
3737
#include "stm32f1xx_ll_usart.h"
3838
#include "stm32f1xx_ll_tim.h"
39+
#include "stm32f1xx_ll_pwr.h"
3940

4041
#ifdef __cplusplus
4142
extern "C" {

targets/TARGET_STM/TARGET_STM32F2/objects.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "PinNames.h"
3737
#include "stm32f2xx_ll_usart.h"
3838
#include "stm32f2xx_ll_tim.h"
39+
#include "stm32f2xx_ll_pwr.h"
3940

4041
#ifdef __cplusplus
4142
extern "C" {

targets/TARGET_STM/TARGET_STM32F3/common_objects.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "PinNames.h"
3737
#include "stm32f3xx_ll_usart.h"
3838
#include "stm32f3xx_ll_tim.h"
39+
#include "stm32f3xx_ll_pwr.h"
3940

4041
#ifdef __cplusplus
4142
extern "C" {

targets/TARGET_STM/TARGET_STM32F4/common_objects.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "PinNames.h"
3737
#include "stm32f4xx_ll_usart.h"
3838
#include "stm32f4xx_ll_tim.h"
39+
#include "stm32f4xx_ll_pwr.h"
3940

4041
#ifdef __cplusplus
4142
extern "C" {

targets/TARGET_STM/TARGET_STM32F7/common_objects.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include "stm32f7xx_ll_tim.h"
3939
#include "stm32f7xx_ll_adc.h"
4040
#include "stm32f7xx_ll_rtc.h"
41+
#include "stm32f7xx_ll_pwr.h"
4142

4243
#ifdef __cplusplus
4344
extern "C" {

targets/TARGET_STM/TARGET_STM32H7/objects.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040
#if defined(DUAL_CORE)
4141
#include "stm32h7xx_ll_hsem.h"
4242
#include "stm32h7xx_ll_rcc.h"
43-
#include "stm32h7xx_ll_pwr.h"
4443
#include "stm32h7xx_ll_cortex.h"
4544
#endif /* CONFIG_STM32H7_DUAL_CORE */
45+
#include "stm32h7xx_ll_pwr.h"
4646

4747
#ifdef __cplusplus
4848
extern "C" {

targets/TARGET_STM/TARGET_STM32L0/common_objects.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "PinNames.h"
3737
#include "stm32l0xx_ll_usart.h"
3838
#include "stm32l0xx_ll_tim.h"
39+
#include "stm32l0xx_ll_pwr.h"
3940

4041
#ifdef __cplusplus
4142
extern "C" {

targets/TARGET_STM/TARGET_STM32L1/common_objects.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "PinNames.h"
3737
#include "stm32l1xx_ll_usart.h"
3838
#include "stm32l1xx_ll_tim.h"
39+
#include "stm32l1xx_ll_pwr.h"
3940

4041
#ifdef __cplusplus
4142
extern "C" {

targets/TARGET_STM/TARGET_STM32L4/common_objects.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include "stm32l4xx_ll_lpuart.h"
3939
#include "stm32l4xx_ll_tim.h"
4040
#include "stm32l4xx_ll_rtc.h"
41+
#include "stm32l4xx_ll_pwr.h"
4142

4243
#ifdef __cplusplus
4344
extern "C" {

0 commit comments

Comments
 (0)