2019-06-07 14:29:34 -03:00
|
|
|
#include <Kernel/CMOS.h>
|
|
|
|
|
#include <Kernel/IO.h>
|
2018-10-16 06:01:38 -03:00
|
|
|
|
|
|
|
|
namespace CMOS {
|
|
|
|
|
|
2018-11-16 21:11:08 -02:00
|
|
|
byte read(byte index)
|
2018-10-16 06:01:38 -03:00
|
|
|
{
|
|
|
|
|
IO::out8(0x70, index);
|
|
|
|
|
return IO::in8(0x71);
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-16 21:11:08 -02:00
|
|
|
void write(byte index, byte data)
|
2018-10-16 06:01:38 -03:00
|
|
|
{
|
|
|
|
|
IO::out8(0x70, index);
|
|
|
|
|
IO::out8(0x71, data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|