Battery.H
Go to the documentation of this file.
1
8
// The contents of this file are subject to the Mozilla Public License
9
// Version 1.0 (the "License"); you may not use this file except in
10
// compliance with the License. You may obtain a copy of the License
11
// at http://www.mozilla.org/MPL/
12
//
13
// Software distributed under the License is distributed on an "AS IS"
14
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
15
// the License for the specific language governing rights and
16
// limitations under the License.
17
//
18
// This software was developed as part of the legOS project.
19
//
20
// Contributor: Pat Welch (legOS@mousebrains.com)
21
22
#ifndef _Battery_H_
23
#define _Battery_H_
24
25
#include <
config.h
>
26
#include <
sys/battery.h
>
27
28
#if defined(CONF_DSENSOR)
29
38
class
Battery
{
39
public
:
45
static
int
get
() {
return
get_battery_mv
();}
46
};
47
48
#else // CONF_DSENSOR
49
#warning Enable CONF_DSENSOR to use Battery.H
50
#endif // CONF_DSENSOR
51
#endif // _Battery_H_
battery.h
Internal Interface: battery handling.
get_battery_mv
int get_battery_mv()
get current battery voltage
Battery::get
static int get()
get the current battery strength value
Definition:
Battery.H:45
Battery
Definition:
Battery.H:38
config.h
kernel configuration file
brickOS
is released under the
Mozilla Public License
.
Original code copyright 1998-2005 by the authors.
Generated for brickOS Kernel Developer by
1.8.16