Skip to content

Commit 1e6f952

Browse files
committed
Move the STM32 low power driver from core to library
To avoid further dependency issue with the core. Signed-off-by: Frederic Pillon <[email protected]>
1 parent 0ee07d1 commit 1e6f952

File tree

4 files changed

+441
-8
lines changed

4 files changed

+441
-8
lines changed

src/STM32LowPower.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
/**
22
******************************************************************************
33
* @file STM32LowPower.cpp
4-
* @author WI6LABS
5-
* @version V1.0.0
6-
* @date 11-December-2017
4+
* @author Frederic Pillon
75
* @brief Provides a STM32 Low Power interface with Arduino
86
*
97
******************************************************************************
108
* @attention
119
*
12-
* <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
10+
* <h2><center>&copy; COPYRIGHT(c) 2020 STMicroelectronics</center></h2>
1311
*
1412
* Redistribution and use in source and binary forms, with or without modification,
1513
* are permitted provided that the following conditions are met:

src/STM32LowPower.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
/**
22
******************************************************************************
33
* @file STM32LowPower.h
4-
* @author WI6LABS
5-
* @version V1.0.0
6-
* @date 11-December-2017
4+
* @author Frederic Pillon
75
* @brief Provides a STM32 Low Power interface with Arduino
86
*
97
******************************************************************************
108
* @attention
119
*
12-
* <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
10+
* <h2><center>&copy; COPYRIGHT(c) 2020 STMicroelectronics</center></h2>
1311
*
1412
* Redistribution and use in source and binary forms, with or without modification,
1513
* are permitted provided that the following conditions are met:
@@ -41,6 +39,10 @@
4139

4240
#include <Arduino.h>
4341

42+
#if defined(STM32_CORE_VERSION) && (STM32_CORE_VERSION > 0x01090000)
43+
#include "low_power.h"
44+
#endif
45+
4446
// Check if PWR HAL enable in variants/board_name/stm32yzxx_hal_conf.h
4547
#ifndef HAL_PWR_MODULE_ENABLED
4648
#error "PWR configuration is missing. Check flag HAL_PWR_MODULE_ENABLED in variants/board_name/stm32yzxx_hal_conf.h"

0 commit comments

Comments
 (0)