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

📄 battery.c

📁 CIRRUS 公司EP93XX系列CPU的WINCE下的BSP
💻 C
字号:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
/* -*-C-*-
 *
 * $Revision: 1.3 $
 *   $Author: xinxing $
 *     $Date: 2005/04/29 02:45:53 $
 *
 * Module Name:
 *
 * Abstract:
 *
 *    Battery driver for Integrator (copied from ODO implementation)
 *
 * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
 * ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
 * PARTICULAR PURPOSE.
 *
 * Copyright (c) 2000 ARM Limited
 * All Rights Reserved
 */

#include <windows.h>
#include <battery.h>


BOOL WINAPI BatteryDrvrGetStatus(PSYSTEM_POWER_STATUS_EX2 pstatus,
                                 PBOOL pfBatteriesChangedSinceLastCall)
{
    // Battery driver not actually implemented for Integrator
    pstatus->ACLineStatus               = AC_LINE_ONLINE;
    pstatus->BatteryFlag                = BATTERY_FLAG_NO_BATTERY;
    pstatus->BatteryLifePercent         = 0;
    pstatus->Reserved1                  = 0;
    pstatus->BatteryLifeTime            = BATTERY_LIFE_UNKNOWN;
    pstatus->BatteryFullLifeTime        = BATTERY_LIFE_UNKNOWN;

    pstatus->Reserved2                  = 0;
    pstatus->BackupBatteryFlag          = BATTERY_FLAG_HIGH;
    pstatus->BackupBatteryLifePercent   = 0;
    pstatus->Reserved3                  = 0;
    pstatus->BackupBatteryLifeTime      = BATTERY_LIFE_UNKNOWN;
    pstatus->BackupBatteryFullLifeTime  = BATTERY_LIFE_UNKNOWN;

    pstatus->BatteryChemistry           = BATTERY_CHEMISTRY_UNKNOWN;
    pstatus->BatteryVoltage             = 0;
    pstatus->BatteryCurrent             = 0;
    pstatus->BatteryAverageCurrent      = 0;
    pstatus->BatteryAverageInterval     = 0;
    pstatus->BatterymAHourConsumed      = 0;
    pstatus->BatteryTemperature         = 0;
    pstatus->BackupBatteryVoltage       = 0;

    *pfBatteriesChangedSinceLastCall = FALSE;
    return (TRUE);
}


LONG BatteryDrvrGetLevels(void)
{
    return MAKELONG(0 /* main battery levels   */,
                    0 /* backup battery levels */);
}

BOOL BatteryDrvrSupportsChangeNotification(void)
{
    return FALSE;
}

/* EOF battery.c */

⌨️ 快捷键说明

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