InES Hardware Abstraction Layer
hal_pwr.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * -- _____ ______ _____ -
3  * -- |_ _| | ____|/ ____| -
4  * -- | | _ __ | |__ | (___ Institute of Embedded Systems -
5  * -- | | | '_ \| __| \___ \ Zurich University of -
6  * -- _| |_| | | | |____ ____) | Applied Sciences -
7  * -- |_____|_| |_|______|_____/ 8401 Winterthur, Switzerland -
8  * ------------------------------------------------------------------------- */
18 /* Re-definition guard */
19 #ifndef _HAL_PWR_H
20 #define _HAL_PWR_H
21 
22 
23 /* User includes */
24 #include "hal_common.h"
25 
26 
27 /* -- Type definitions
28  * ------------------------------------------------------------------------- */
29 
34 typedef enum {
35  HAL_PWR_REGULATOR_MAIN = 0u,
36  HAL_PWR_REGULATOR_LOWPOWER = 1u
38 
43 typedef enum {
44  HAL_PWR_LP_ENTRY_WFI = 0u,
45  HAL_PWR_LP_ENTRY_WFE = 1u
47 
48 
49 /* -- Public function declarations
50  * ------------------------------------------------------------------------- */
51 
55 void hal_pwr_reset(void)
56 __attribute__((deprecated("Please use PWR_RESET().")));
57 
64 
70 
76 
82 
89 
96 
97 
98 
99 /* Power voltage detection -> irq if Vdd high/low, progr. treshhold
100  * Maybe for later
101 
102 void HAL_PWR_PVDConfig(PWR_PVDTypeDef *sConfigPVD);
103 
104 void HAL_PWR_EnablePVD(void);
105 void HAL_PWR_DisablePVD(void);
106 
107 void HAL_PWR_PVD_IRQHandler(void);
108 void HAL_PWR_PVDCallback(void);
109 */
110 
111 #endif
hal_bool_t hal_pwr_set_overdrive(hal_bool_t status)
Enables/Disables the voltage regulator overdrive mode.
void hal_pwr_set_backup_access(hal_bool_t status)
Enables/Disables write access to backup domain.
void hal_pwr_reset(void) __attribute__((deprecated("Please use PWR_RESET().")))
Resets the periphery to default values.
hal_pwr_lp_entry_t
Defines the method used to enter/leave the low power modes.
Definition: hal_pwr.h:43
Common #defines and typedefs.
hal_bool_t hal_pwr_set_underdrive(hal_bool_t status)
Enables/Disables the voltage regulator underdrive mode.
hal_pwr_regulator_t
Defines the available voltage regulators.
Definition: hal_pwr.h:34
void hal_pwr_set_flash_powerdown(hal_bool_t status)
Enables/Disables the flash powerdown mode.
hal_bool_t
Often used TRUE / FALSE type.
Definition: hal_common.h:31
hal_bool_t hal_pwr_set_backup_domain(hal_bool_t status)
Enables/disables the backup domain (RTC, backup sram/registers).
void hal_pwr_set_wakeup_pin(hal_bool_t status)
Enables/Disables the wakeup pin.