#include "smbios_c/compat.h"
#include "smbios_c/types.h"
Go to the source code of this file.
Functions | |
int DLL_SPEC | cmos_read_byte (u8 *byte, u32 indexPort, u32 dataPort, u32 offset) |
Read byte from CMOS. | |
int DLL_SPEC | cmos_write_byte (u8 byte, u32 indexPort, u32 dataPort, u32 offset) |
Write byte to CMOS. | |
int DLL_SPEC | cmos_run_callbacks (bool do_update) |
Run all registered CMOS callbacks. | |
const char *DLL_SPEC | cmos_strerror () |
Returns string describing the last error condition. |
Read byte from CMOS.
byte | pointer to buffer were byte will be stored | |
indexPort | the io port where we write the offset | |
dataPort | the io port where we will read the resulting value | |
offset | the offset into cmos (usually cmos is 256 byte banks) |
int DLL_SPEC cmos_run_callbacks | ( | bool | do_update | ) |
Run all registered CMOS callbacks.
Higher layers can register callbacks that are run when any byte in CMOS is changed. Presently, all these callbacks are used to update checksums in CMOS. If do_update is false, return code indicates if checksums are currently correct.
do_update | should callback update checksum if it is wrong |
const char* DLL_SPEC cmos_strerror | ( | ) |
Returns string describing the last error condition.
Can return 0. The buffer used is guaranteed to be valid until the next call to any cmos_* function. Copy the contents if you need it longer.
Write byte to CMOS.
byte | byte to write | |
indexPort | the io port where we write the offset | |
dataPort | the io port where we will write the byte | |
offset | the offset into cmos (usually cmos is 256 byte banks) |