⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 powermanage.h

📁 philips arm7 lpc2103的常用功能的库函数第二部分
💻 H
字号:
/***********************************************Copyright (c)*********************************************
**                                Guangzou ZLG-MCU Development Co.,LTD.
**                                     
**                                       http://www.zlgmcu.com
**
**--------------File Info---------------------------------------------------------------------------------
** File name:			    PowerManage.h
** Last modified Date:      2007-11-08
** Last Version:		    1.0
** Descriptions:		    电源管理功能头文件,供用户使用.
**
**--------------------------------------------------------------------------------------------------------
** Created by:			    WangGuoguang
** Created date:		    2007-11-08
** Version:				    1.0
** Descriptions:		    此头文件可在config.h中包含.
**
**--------------------------------------------------------------------------------------------------------
** Modified by:			    WangGuoguang 
** Modified Date:		    
** Version:				    
** Descriptions:		    
**
*********************************************************************************************************/

#ifndef __POWERMANAGE_H
#define __POWERMANAGE_H

/*********************************************************************************************************
  POWER 软件包裁剪 
*********************************************************************************************************/

#define POWERMANAGE_FUN_LIB                   1                                  
                    
/*********************************************************************************************************
  POWER 电源状态定义
*********************************************************************************************************/

#define POWER_IDLE                            10
#define POWER_DOWN                            11
#define POWER_NOMAL                           12
 
/*********************************************************************************************************
  POWER 功能外设电源状态定义
*********************************************************************************************************/

#define PART_POWER_ON                         20
#define PART_POWER_OFF                        21

#define PART_RSV                              30

/*********************************************************************************************************
  POWER 外设功率控制定义
*********************************************************************************************************/
                    
#define  PCTIM0                               1                         /* 定时器0                      */
#define  PCTIM1                               2                         /* 定时器1                      */
#define  PCURT0                               3                         /* UART0                        */ 
#define  PCURT1                               4                         /* UART1                        */ 
#define  PCPWM0                               5                         /* PWM0                         */ 

#define  PCRSV                                6

#define  PCI2C                                7                         /* I2C                          */
#define  PCSPI0                               8                         /* SPI0                         */
#define  PCRTC                                9                         /* RTC                          */
#define  PCSPI1                               10                        /* SPI1                         */
#define  PCEMC	                              11	                    /* EMC                          */
#define  PCAD                                 12                        /* ADC                          */


/*********************************************************************************************************
** Function name:         EnterLowPower
**
** Descriptions:          设置处理器进入低功耗模式
** Input parameters:      uiCtrl  --控制模式宏参数
**                                  关键字:  POWER_IDLE  空闲模式
**                                           POWER_DOWN  掉电模式
**                        pRsv    --保留指针参数,可输入NULL.
**
** Output parameters:     OPERATE_FAIL    -- 参数错误
** Returned value:        OPERATE_SUCCESS -- 操作成功
**
*********************************************************************************************************/

uint32    lowPowerEnter (uint32 uiCtrl, char *pRsv);

/*********************************************************************************************************
** Function name:         PartPowerManage
**
** Descriptions:          设置功能部件功率控制
**
** Input parameters:      uiPartID --具体见 PowerManage.h 头文件宏定义.例:PCTIM0,PCURT0.....
**                        uiCtrl   --控制模式宏参数
**                                   关键字:  PART_POWER_ON   正常模式
**                                            PART_POWER_OFF  节电模式
**                        pRsv     --保留指针参数,可输入NULL.
**
** Output parameters:     OPERATE_FAIL    -- 参数错误
** Returned value:        OPERATE_SUCCESS -- 操作成功
**
*********************************************************************************************************/

uint32    partPowerManage (uint32 uiPartID, 
                           uint32 uiCtrl,
                           char  *pRsv); 

/*********************************************************************************************************
** Function name:         GetPartPowerState
**
** Descriptions:          读取功能部件功率控制状态
**
** Input parameters:      uiPartID --具体见 PowerManage.h 头文件宏定义.例:PCTIM0,PCURT0.....
**                        pRsv     --保留指针参数,可输入NULL.
**
** Output parameters:     OPERATE_FAIL               -- 参数错误
** Returned value:        对应功能部件的功率控制状态 -- 操作成功 0: 节电状态 ; 1: 正常状态
**
** Notice :               在空闲与掉电模式下,处理器指令的执行都被挂起,而直至发生复位或中断唤醒事件为止.
**                        此时,不能通过指令来执行功率控制模式的查询,而只能查询相关功能部件节电状态.
*********************************************************************************************************/

uint32    partGetPowerState (uint32 uiPartID, char *pRsv); 

       
                    

#endif                                                                  /*  __POWERMANAGE_H             */
/*********************************************************************************************************
  END
*********************************************************************************************************/                    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -