Loading...
Searching...
No Matches
cpu_pm.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016 Freie Universität Berlin
3 * SPDX-FileCopyrightText: 2017 OTA keys S.A.
4 * SPDX-License-Identifier: LGPL-2.1-only
5 */
6
7#pragma once
8
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
31#define PM_NUM_MODES (3U)
32
37#define STM32_PM_IDLE (2U)
38#define STM32_PM_STOP (1U)
39#define STM32_PM_STANDBY (0U)
41
42#ifndef PM_EWUP_CONFIG
46# ifdef CPU_FAM_STM32H7
47# define PM_EWUP_CONFIG (PWR_WKUPEPR_WKUPEN4) /* Enable WKUP4 pin (BTN0) */
48# else
49# define PM_EWUP_CONFIG (0U)
50# endif
51#endif
53
58
64
69
70#ifdef __cplusplus
71}
72#endif
73
void pm_backup_regulator_off(void)
Disable the backup domain voltage regulator.
void pm_backup_regulator_on(void)
Enable the backup domain voltage regulator to retain backup register content during standby and VBAT ...
bool pm_backup_regulator_is_on(void)
Check whether the backup domain voltage regulator is on.