libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
pwr.c
Go to the documentation of this file.
1/** @defgroup pwr_file PWR peripheral API
2 *
3 * @ingroup peripheral_apis
4 *
5 * @brief <b>libopencm3 STM32F4xx Power Control</b>
6 *
7 * @version 1.0.0
8 *
9 * @author @htmlonly &copy; @endhtmlonly 2011 Stephen Caudle <scaudle@doceme.com>
10 *
11 * @date 4 March 2013
12 *
13 * This library supports the power control system for the
14 * STM32F4 series of ARM Cortex Microcontrollers by ST Microelectronics.
15 *
16 * LGPL License Terms @ref lgpl_license
17 */
18/*
19 * This file is part of the libopencm3 project.
20 *
21 * Copyright (C) 2011 Stephen Caudle <scaudle@doceme.com>
22 *
23 * This library is free software: you can redistribute it and/or modify
24 * it under the terms of the GNU Lesser General Public License as published by
25 * the Free Software Foundation, either version 3 of the License, or
26 * (at your option) any later version.
27 *
28 * This library is distributed in the hope that it will be useful,
29 * but WITHOUT ANY WARRANTY; without even the implied warranty of
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 * GNU Lesser General Public License for more details.
32 *
33 * You should have received a copy of the GNU Lesser General Public License
34 * along with this library. If not, see <http://www.gnu.org/licenses/>.
35 */
36
38
39/**@{*/
40
42{
43 uint32_t reg32;
45 reg32 |= (scale & PWR_CR_VOS_MASK) << PWR_CR_VOS_SHIFT;
46 PWR_CR = reg32;
47}
48
49/**@}*/
#define PWR_CR_VOS_MASK
Definition: f4/pwr.h:50
#define PWR_CR
Power control register (PWR_CR)
Definition: pwr_common_v1.h:41
pwr_vos_scale
Definition: f4/pwr.h:79
#define PWR_CR_VOS_SHIFT
VOS: Regulator voltage scaling output selection.
Definition: f4/pwr.h:49
void pwr_set_vos_scale(enum pwr_vos_scale scale)
Definition: pwr.c:41