libsmbios_c library
Main Page
Data Structures
Files
File List
Globals
src
include
smbios_c
obj
cmos.h
Go to the documentation of this file.
1
// vim:expandtab:autoindent:tabstop=4:shiftwidth=4:filetype=c:
2
/*
3
* Copyright (C) 2005 Dell Inc.
4
* by Michael Brown <Michael_E_Brown@dell.com>
5
* Licensed under the Open Software License version 2.1
6
*
7
* Alternatively, you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published
9
* by the Free Software Foundation; either version 2 of the License,
10
* or (at your option) any later version.
11
12
* This program is distributed in the hope that it will be useful, but
13
* WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
* See the GNU General Public License for more details.
16
*/
17
18
19
#ifndef C_OBJ_CMOS_H
20
#define C_OBJ_CMOS_H
21
22
// include smbios_c/compat.h first
23
#include "
smbios_c/compat.h
"
24
25
#include "
smbios_c/types.h
"
26
27
EXTERN_C_BEGIN
;
28
29
#define CMOS_DEFAULTS 0x0000
30
#define CMOS_GET_SINGLETON 0x0001
31
#define CMOS_GET_NEW 0x0002
32
#define CMOS_UNIT_TEST_MODE 0x0004
33
#define CMOS_NO_ERR_CLEAR 0x0008
34
35
// forward declaration to reduce header file deps
36
struct
cmos_access_obj;
37
38
LIBSMBIOS_C_DLL_SPEC
struct
cmos_access_obj *
cmos_obj_factory
(
int
flags, ...);
39
LIBSMBIOS_C_DLL_SPEC
void
cmos_obj_free
(
struct
cmos_access_obj *);
40
41
LIBSMBIOS_C_DLL_SPEC
int
cmos_obj_read_byte
(
const
struct
cmos_access_obj *,
u8
*byte,
u32
indexPort,
u32
dataPort,
u32
offset);
42
LIBSMBIOS_C_DLL_SPEC
int
cmos_obj_write_byte
(
const
struct
cmos_access_obj *,
u8
byte,
u32
indexPort,
u32
dataPort,
u32
offset);
43
44
// format error string
45
LIBSMBIOS_C_DLL_SPEC
const
char
*
cmos_obj_strerror
(
const
struct
cmos_access_obj *m);
46
47
// useful for checksums, etc
48
typedef
int (*
cmos_write_callback
)(
const
struct
cmos_access_obj *, bool,
void
*);
49
LIBSMBIOS_C_DLL_SPEC
void
cmos_obj_register_write_callback
(
struct
cmos_access_obj *,
cmos_write_callback
,
void
*,
void
(*destruct)(
void
*));
50
LIBSMBIOS_C_DLL_SPEC
int
cmos_obj_run_callbacks
(
const
struct
cmos_access_obj *m,
bool
do_update);
51
52
EXTERN_C_END
;
53
54
#endif
/* CMOS_H */
Generated on Fri May 31 2013 17:57:55 for libsmbios_c library by
1.8.3.1