1 /**********************************************************************
\r
2 * $Id$ lpc18xx_pwr.c 2011-06-02
\r
4 * @file lpc18xx_pwr.c
\r
5 * @brief Contains all functions support for Power Control
\r
6 * firmware library on LPC18xx
\r
8 * @date 02. June. 2011
\r
9 * @author NXP MCU SW Application Team
\r
11 * Copyright(C) 2011, NXP Semiconductor
\r
12 * All rights reserved.
\r
14 ***********************************************************************
\r
15 * Software that is described herein is for illustrative purposes only
\r
16 * which provides customers with programming information regarding the
\r
17 * products. This software is supplied "AS IS" without any warranties.
\r
18 * NXP Semiconductors assumes no responsibility or liability for the
\r
19 * use of the software, conveys no license or title under any patent,
\r
20 * copyright, or mask work right to the product. NXP Semiconductors
\r
21 * reserves the right to make changes in the software without
\r
22 * notification. NXP Semiconductors also make no representation or
\r
23 * warranty that such application will be suitable for the specified
\r
24 * use without further testing or modification.
\r
25 **********************************************************************/
\r
27 /* Peripheral group ----------------------------------------------------------- */
\r
32 /* Includes ------------------------------------------------------------------- */
\r
33 #include "lpc_types.h"
\r
34 #include "lpc18xx_scu.h"
\r
35 #include "lpc18xx_pwr.h"
\r
37 /*********************************************************************//**
\r
38 * @brief Enter Sleep mode with co-operated instruction by the Cortex-M3.
\r
41 **********************************************************************/
\r
42 void PWR_Sleep(void)
\r
44 //LPC_PMC->SLEEP0_MODE = 0x00;
\r
50 /*********************************************************************//**
\r
51 * @brief Enter Deep Sleep mode with co-operated instruction by the Cortex-M3.
\r
54 **********************************************************************/
\r
55 void PWR_DeepSleep(void)
\r
57 /* Deep-Sleep Mode, set SLEEPDEEP bit */
\r
59 LPC_PMC->PD0_SLEEP0_MODE = PWR_SLEEP_MODE_DEEP_SLEEP;
\r
60 /* Deep Sleep Mode*/
\r
65 /*********************************************************************//**
\r
66 * @brief Enter Power Down mode with co-operated instruction by the Cortex-M3.
\r
69 **********************************************************************/
\r
70 void PWR_PowerDown(void)
\r
72 /* Deep-Sleep Mode, set SLEEPDEEP bit */
\r
74 LPC_PMC->PD0_SLEEP0_MODE = PWR_SLEEP_MODE_POWER_DOWN;
\r
75 /* Power Down Mode*/
\r
80 /*********************************************************************//**
\r
81 * @brief Enter Deep Power Down mode with co-operated instruction by the Cortex-M3.
\r
84 **********************************************************************/
\r
85 void PWR_DeepPowerDown(void)
\r
87 /* Deep-Sleep Mode, set SLEEPDEEP bit */
\r
89 LPC_PMC->PD0_SLEEP0_MODE = PWR_SLEEP_MODE_DEEP_POWER_DOWN;
\r
90 /* Deep Power Down Mode*/
\r
102 /* --------------------------------- End Of File ------------------------------ */
\r