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 Power/Sleep API
2 * @brief SWM050 Power API.
3 * @ingroup peripheral_apis
4 * LGPL License Terms @ref lgpl_license
5 * @author @htmlonly © @endhtmlonly 2019
6 * Caleb Szalacinski <contact@skiboy.net>
7 */
8/*
9 * This file is part of the libopencm3 project.
10 *
11 * Copyright (C) 2019 Caleb Szalacinski <contact@skiboy.net>
12 *
13 * This library is free software: you can redistribute it and/or modify
14 * it under the terms of the GNU Lesser General Public License as published by
15 * the Free Software Foundation, either version 3 of the License, or
16 * (at your option) any later version.
17 *
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License for more details.
22 *
23 * You should have received a copy of the GNU Lesser General Public License
24 * along with this library. If not, see <http://www.gnu.org/licenses/>.
25 */
26/**@{*/
29
30/*---------------------------------------------------------------------------*/
31/** @brief Go into sleep mode
32
33Goes to sleep and wakes up on when GPIO pin 9 is pulled low. Please give
34yourself enough time to connect the debugger before calling this, in order to
35not get locked out of the MCU.
36
37*/
38void pwr_sleep(void)
39{
41}
42/**@}*/
void pwr_sleep(void)
Go into sleep mode.
Definition: pwr.c:38
#define SYSCTL_SYS_CFG_2_SLEEP
Definition: sysctl.h:36
#define SYSCTL_SYS_CFG_2
MOS Disconnect (Synwit says that this subregister is unused), Sleep Mode, and Internal Oscillator Dis...
Definition: sysctl.h:54