LIVM/device/clock.c
Ærþ d02a5d3dfd
Console Device is ready to use
+ started doing clock devices
+ console device is now located at devices[1], devices[0] is clock
2022-02-19 13:10:48 +07:00

36 lines
695 B
C

#define CLOCK vm->devices[0]
void clock_write(struct VMinst* vm, void* data, uint64_t length) {
}
void clock_out(struct VMinst* vm) {
}
void clock_read(struct VMinst* vm, void* buffer, uint64_t length, uint64_t where) {
}
void clock_wait(struct VMinst* vm, uint64_t data) {
}
void clock_poweroff(struct VMinst* vm) {
#ifdef LLLIVMDEBUG
puts("clock_poweroff<");
#endif
free(CLOCK.buffer);
#ifdef LLLIVMDEBUG
puts("clock_poweroff>");
#endif
}
void setup_clock(struct VMinst* vm) {
CLOCK.buffer = malloc(10240);
CLOCK.write = &clock_write;
CLOCK.out = &clock_out;
CLOCK.read = &clock_read;
CLOCK.wait = &clock_wait;
CLOCK.poweroff = &clock_poweroff;
}