Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
pmu.h
00001 /**************************************************************************/ 00002 /*! 00003 @file pmu.c 00004 00005 @section LICENSE 00006 00007 Software License Agreement (BSD License) 00008 00009 Copyright (c) 2013, K. Townsend (microBuilder.eu) 00010 All rights reserved. 00011 00012 Redistribution and use in source and binary forms, with or without 00013 modification, are permitted provided that the following conditions are met: 00014 1. Redistributions of source code must retain the above copyright 00015 notice, this list of conditions and the following disclaimer. 00016 2. Redistributions in binary form must reproduce the above copyright 00017 notice, this list of conditions and the following disclaimer in the 00018 documentation and/or other materials provided with the distribution. 00019 3. Neither the name of the copyright holders nor the 00020 names of its contributors may be used to endorse or promote products 00021 derived from this software without specific prior written permission. 00022 00023 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY 00024 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00025 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00026 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY 00027 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00028 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00029 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00030 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00031 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00032 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00033 */ 00034 /**************************************************************************/ 00035 #ifndef __PMU_H__ 00036 #define __PMU_H__ 00037 00038 #ifdef __cplusplus 00039 extern "C" { 00040 #endif 00041 00042 #include "projectconfig.h" 00043 00044 #define MCU_SLEEP (0) 00045 #define MCU_DEEP_SLEEP (1) 00046 #define MCU_POWER_DOWN (2) 00047 00048 #define NVIC_LP_SEVONPEND (0x10) 00049 #define NVIC_LP_SLEEPDEEP (0x04) 00050 #define NVIC_LP_SLEEPONEXIT (0x02) 00051 00052 #define IRC_OUT_PD (0x1<<0) 00053 #define IRC_PD (0x1<<1) 00054 #define FLASH_PD (0x1<<2) 00055 #define BOD_PD (0x1<<3) 00056 #define ADC_PD (0x1<<4) 00057 #define SYS_OSC_PD (0x1<<5) 00058 #define WDT_OSC_PD (0x1<<6) 00059 #define SYS_PLL_PD (0x1<<7) 00060 #define USBPLL_PD (0x1<<8) 00061 #define USBPAD_PD (0x1<<10) 00062 00063 void PMU_Sleep( uint32_t SleepMode, uint32_t SleepCtrl ); 00064 00065 #ifdef __cplusplus 00066 } 00067 #endif 00068 00069 #endif
Generated on Wed Jul 13 2022 09:22:30 by
1.7.2