aboutsummaryrefslogtreecommitdiff
path: root/lib/stm32/f1/pwr.c
diff options
context:
space:
mode:
authorKen Sarkies2013-03-07 11:14:06 +1030
committerKen Sarkies2013-03-07 11:14:06 +1030
commite2022f588492d5c117743b6b13801940f4a4b03e (patch)
tree8c70e829e69094361afa51489ef097a5e663ea6c /lib/stm32/f1/pwr.c
parent31aa3b6f5a9e9afa4d1bc8661cbaef147af55f74 (diff)
Repair to documentation (most documented files)
to remove errors, duplications and inconsistencies. File lib/stm32/f1/pwr.c - all code removed as it duplicates that in common/pwr_common.c Remaining changes do not affect code. Compiles OK. TODO efm32 has no code so generates no modules TODO F2 needs pwr.c TODO L1 needs dma.h and dma.c
Diffstat (limited to 'lib/stm32/f1/pwr.c')
-rw-r--r--lib/stm32/f1/pwr.c177
1 files changed, 1 insertions, 176 deletions
diff --git a/lib/stm32/f1/pwr.c b/lib/stm32/f1/pwr.c
index 451ed1c..8e59bab 100644
--- a/lib/stm32/f1/pwr.c
+++ b/lib/stm32/f1/pwr.c
@@ -1,4 +1,4 @@
-/** @defgroup STM32F1xx-pwr-file PWR
+/** @defgroup pwr-file PWR
@ingroup STM32F1xx
@@ -38,180 +38,5 @@ LGPL License Terms @ref lgpl_license
#include <libopencm3/stm32/pwr.h>
-/*---------------------------------------------------------------------------*/
-/** @brief Disable Backup Domain Write Protection.
-
-This allows backup domain registers to be changed. These registers are write
-protected after a reset.
-*/
-
-void pwr_disable_backup_domain_write_protect(void)
-{
- PWR_CR |= PWR_CR_DBP;
-}
-
-/*---------------------------------------------------------------------------*/
-/** @brief Re-enable Backup Domain Write Protection.
-
-This protects backup domain registers from inadvertent change.
-*/
-
-void pwr_enable_backup_domain_write_protect(void)
-{
- PWR_CR &= ~PWR_CR_DBP;
-}
-
-/*---------------------------------------------------------------------------*/
-/** @brief Enable Power Voltage Detector.
-
-This provides voltage level threshold detection. The result of detection is
-provided in the power voltage detector output flag (see @ref pwr_voltage_high)
-or by setting the EXTI16 interrupt (see datasheet for configuration details).
-
-@param[in] pvd_level u32. Taken from @ref pwr_pls.
-*/
-
-void pwr_enable_power_voltage_detect(u32 pvd_level)
-{
- PWR_CR &= ~PWR_CR_PLS_MASK;
- PWR_CR |= (PWR_CR_PVDE | pvd_level);
-}
-
-/*---------------------------------------------------------------------------*/
-/** @brief Disable Power Voltage Detector.
-
-*/
-
-void pwr_disable_power_voltage_detect(void)
-{
- PWR_CR &= ~PWR_CR_PVDE;
-}
-
-/*---------------------------------------------------------------------------*/
-/** @brief Clear the Standby Flag.
-
-This is set when the processor returns from a standby mode.
-*/
-
-void pwr_clear_standby_flag(void)
-{
- PWR_CR |= PWR_CR_CSBF;
-}
-
-/*---------------------------------------------------------------------------*/
-/** @brief Clear the Wakeup Flag.
-
-This is set when the processor receives a wakeup signal.
-*/
-
-void pwr_clear_wakeup_flag(void)
-{
- PWR_CR |= PWR_CR_CWUF;
-}
-
-/*---------------------------------------------------------------------------*/
-/** @brief Set Standby Mode in Deep Sleep.
-
-*/
-
-void pwr_set_standby_mode(void)
-{
- PWR_CR |= PWR_CR_PDDS;
-}
-
-/*---------------------------------------------------------------------------*/
-/** @brief Set Stop Mode in Deep Sleep.
-
-*/
-
-void pwr_set_stop_mode(void)
-{
- PWR_CR &= ~PWR_CR_PDDS;
-}
-
-/*---------------------------------------------------------------------------*/
-/** @brief Voltage Regulator On in Stop Mode.
-
-*/
-
-void pwr_voltage_regulator_on_in_stop(void)
-{
- PWR_CR &= ~PWR_CR_LPDS;
-}
-
-/*---------------------------------------------------------------------------*/
-/** @brief Voltage Regulator Low Power in Stop Mode.
-
-*/
-
-void pwr_voltage_regulator_low_power_in_stop(void)
-{
- PWR_CR |= PWR_CR_LPDS;
-}
-
-/*---------------------------------------------------------------------------*/
-/** @brief Enable Wakeup Pin.
-
-The wakeup pin is used for waking the processor from standby mode.
-*/
-
-void pwr_enable_wakeup_pin(void)
-{
- PWR_CSR |= PWR_CSR_EWUP;
-}
-
-/*---------------------------------------------------------------------------*/
-/** @brief Release Wakeup Pin.
-
-The wakeup pin is used for general purpose I/O.
-*/
-
-void pwr_disable_wakeup_pin(void)
-{
- PWR_CSR &= ~PWR_CSR_EWUP;
-}
-
-/*---------------------------------------------------------------------------*/
-/** @brief Get Voltage Detector Output.
-
-The voltage detector threshold must be set when the power voltage detector is
-enabled, see @ref pwr_enable_power_voltage_detect.
-
-@returns boolean: TRUE if the power voltage is above the preset voltage
-threshold.
-*/
-
-bool pwr_voltage_high(void)
-{
- return (PWR_CSR & PWR_CSR_PVDO);
-}
-
-/*---------------------------------------------------------------------------*/
-/** @brief Get Standby Flag.
-
-The standby flag is set when the processor returns from a standby state. It is
-cleared by software (see @ref pwr_clear_standby_flag).
-
-@returns boolean: TRUE if the processor was in standby state.
-*/
-
-bool pwr_get_standby_flag(void)
-{
- return (PWR_CSR & PWR_CSR_SBF);
-}
-
-/*---------------------------------------------------------------------------*/
-/** @brief Get Wakeup Flag.
-
-The wakeup flag is set when a wakeup event has been received. It is
-cleared by software (see @ref pwr_clear_wakeup_flag).
-
-@returns boolean: TRUE if a wakeup event was received.
-*/
-
-bool pwr_get_wakeup_flag(void)
-{
- return (PWR_CSR & PWR_CSR_WUF);
-}
/**@}*/