/* $NetBSD: apmbios.h,v 1.7 2012/09/30 21:36:20 dsl Exp $ */
/*-
* Copyright (c) 1995 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by John Kohl.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _DEV_APM_APMBIOS_H_
#define _DEV_APM_APMBIOS_H_
/*
* These definitions were those for the i386 'APM' (which predates ACPI),
* but have been hijacked for all sorts of uses.
* The APM specific values were removed when APM was removed.
*/
/* the first set of battery constants is 1.0 style values;
* the second set is 1.1 style bit definitions */
#define APM_BATT_HIGH 0x00
#define APM_BATT_LOW 0x01
#define APM_BATT_CRITICAL 0x02
#define APM_BATT_CHARGING 0x03
#define APM_BATT_ABSENT 0x04 /* Software only--not in spec! */
#define APM_BATT_UNKNOWN 0xff
/*
* APM info word from the real-mode handler is adjusted to put
* major/minor version in low half and support bits in upper half.
*/
#define APM_MAJOR_VERS(info) (((info)&0xff00)>>8)
#define APM_MINOR_VERS(info) ((info)&0xff)