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

📄 batterypdd.h

📁 pxa270平台 windows mobile 5.2 wm9713 触摸屏+音频驱动
💻 H
字号:
/*******************************************************************************
 * Copyright (c) Wolfson Microelectronics plc.  All rights reserved.
 *
 * This software as well as any related documentation may only be used or
 * copied in accordance with the terms of the Wolfson Microelectronic plc's
 * non-disclosure agreement (NDA). The information in this file is furnished
 * for informational use only, is subject to change without notice, and
 * should not be construed as a commitment by Wolfson Microelectronics plc.
 * Wolfson Microelectronics plc assumes no responsibility or liability for
 * any errors or inaccuracies that may appear in this document or any software
 * that may be provided in association with this document.
 *
 * Except as permitted by the NDA, no part of this document may be reproduced,
 * stored in a retrieval system, or transmitted in any form or by any means
 * without the express written consent of Wolfson Microelectronics plc.
 *                                                                         *//**
 * @file   batterypdd.h
 * @brief  Header for the battery driver.
 *
 * Provides an interface for the PDD for the Mainstone II Wolfson Battery
 * Driver.
 *
 * @version $Id$
 *
 * @Warning
 *   This software is specifically written for Wolfson devices. It may not be
 *   used with other devices.
 ******************************************************************************/
#ifndef __BATTERYPDD_H__
#define __BATTERYPDD_H__

#if ! WM_AUXADC
#error WM_AUXADC needs to be TRUE# in Wolfson\inc\WMConfig.h, then CopyHeaders.bat must be run !
#endif /* ! WM_AUXADC */
/*
 * Function prototypes
 */
#ifdef __cplusplus
extern "C" {
#endif

/******************************************************************************
 * Function: BatteryPDDDeinitialize                                       *//**
 *
 * @brief  This function allows the battery PDD to perform hardware-specific
 *         cleanup.
 *
 * (no parameters)
 *
 *****************************************************************************/
void BatteryPDDDeinitialize();

/******************************************************************************
 * Function: BatteryPDDGetLevels                                          *//**
 *
 * @brief  This function indicates how many battery levels are reported in the
 *         BatteryFlag and BackupBatteryFlag members of the
 *         SYSTEM_POWER_STATUS_EX2 structure filled in by BatteryPDDGetStatus.
 *
 * (no parameters)
 *
 * @return  The low word reports the number of battery levels, from zero to
 *          three, in the main battery.
 *          The high word reports the number of battery levels, from zero to
 *          three, in the backup battery.
 *
 *****************************************************************************/
long BatteryPDDGetLevels();

/******************************************************************************
 * Function: BatteryPDDGetStatus                                          *//**
 *
 * @brief  This function obtains the most current battery and power status
 *         available on the platform. It fills in the structures pointed to by
 *         its parameters.
 *
 * @param pstatus  Pointer to a SYSTEM_POWER_STATUS_EX2 structure.
 *
 * @param pfBatteriesChangedSinceLastCall
 *          Pointer to a flag that the function sets to TRUE if the user
 *          replaced or changed the system's batteries since the last call to
 *          this function.
 *
 * @return  Boolean that indicates success.
 *
 *****************************************************************************/
BOOL BatteryPDDGetStatus( PSYSTEM_POWER_STATUS_EX2 pstatus,
                          PBOOL pfBatteriesChangedSinceLastCall );

/******************************************************************************
 * Function: BatteryPDDInitialize                                         *//**
 *
 * @brief  This function enables the battery PDD to perform hardware-specific
 *         initialization.
 *
 * @param pszRegistryContext  Pointer to the battery driver's device key that
 *                            is passed to the battery driver as the first
 *                            parameter of its Init entry point.
 *
 * @return Boolean that indicates success.
 *
 *****************************************************************************/
BOOL BatteryPDDInitialize( LPCTSTR pszRegistryContext );

/******************************************************************************
 * Function: BatteryPDDPowerHandler                                       *//**
 *
 * @brief  This power callback performs hardware-specific processing for the
 *         battery driver.
 *
 * @param bOff  Equals 'true' if suspending, 'false' if resuming.
 *
 *****************************************************************************/
void BatteryPDDPowerHandler( BOOL bOff );

 /******************************************************************************
 * Function: BatteryPDDResume                                              *//**
 *
 * @brief  This function performs hardware-specific battery processing in a
 *         thread context following system resume.
 *
 * (no parameters)
 *
 *****************************************************************************/
void BatteryPDDResume();

 /******************************************************************************
 * Function: BatteryPDDSupportsChangeNotification                          *//**
 *
 * @brief  This function indicates whether the battery driver can report whether
 *         the batteries were changed.
 *
 * (no parameters)
 *
 * @return  Returns TRUE to indicate that the pfBatteriesChangedSinceLastCall
 *          parameter value filled in by BatteryPDDGetStatus is valid. If there
 *          is no way to tell that the platform's batteries have been changed
 *          this function should return FALSE.
 *
 *****************************************************************************/
BOOL BatteryPDDSupportsChangeNotification();

#ifdef __cplusplus
}   /* extern "C" */
#endif

#endif  /* __BATTERYPDD_H__ */

⌨️ 快捷键说明

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