00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef C_OBJ_CMOS_H
00020 #define C_OBJ_CMOS_H
00021
00022
00023 #include "smbios_c/compat.h"
00024
00025 #include "smbios_c/types.h"
00026
00027 EXTERN_C_BEGIN;
00028
00029 #define CMOS_DEFAULTS 0x0000
00030 #define CMOS_GET_SINGLETON 0x0001
00031 #define CMOS_GET_NEW 0x0002
00032 #define CMOS_UNIT_TEST_MODE 0x0004
00033 #define CMOS_NO_ERR_CLEAR 0x0008
00034
00035
00036 struct cmos_access_obj;
00037
00038 LIBSMBIOS_C_DLL_SPEC struct cmos_access_obj *cmos_obj_factory(int flags, ...);
00039 LIBSMBIOS_C_DLL_SPEC void cmos_obj_free(struct cmos_access_obj *);
00040
00041 LIBSMBIOS_C_DLL_SPEC int cmos_obj_read_byte(const struct cmos_access_obj *, u8 *byte, u32 indexPort, u32 dataPort, u32 offset);
00042 LIBSMBIOS_C_DLL_SPEC int cmos_obj_write_byte(const struct cmos_access_obj *, u8 byte, u32 indexPort, u32 dataPort, u32 offset);
00043
00044
00045 LIBSMBIOS_C_DLL_SPEC const char *cmos_obj_strerror(const struct cmos_access_obj *m);
00046
00047
00048 typedef int (*cmos_write_callback)(const struct cmos_access_obj *, bool, void *);
00049 LIBSMBIOS_C_DLL_SPEC void cmos_obj_register_write_callback(struct cmos_access_obj *, cmos_write_callback, void *, void (*destruct)(void *));
00050 LIBSMBIOS_C_DLL_SPEC int cmos_obj_run_callbacks(const struct cmos_access_obj *m, bool do_update);
00051
00052 EXTERN_C_END;
00053
00054 #endif