diff options
author | Marvin Borner | 2021-04-14 14:34:38 +0200 |
---|---|---|
committer | Marvin Borner | 2021-04-14 14:34:38 +0200 |
commit | 462eaa9531b9e62916b02ab52759cd070de755d3 (patch) | |
tree | 71bb32daa5f8b4389c9d4ce1e42d66600090485f /kernel/drivers/rtc.c | |
parent | 212582f69dea4c99c292081b15ea526014b9ad44 (diff) |
Implemented some I/O interfaces
Diffstat (limited to 'kernel/drivers/rtc.c')
-rw-r--r-- | kernel/drivers/rtc.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/kernel/drivers/rtc.c b/kernel/drivers/rtc.c index a814fa9..01d65f4 100644 --- a/kernel/drivers/rtc.c +++ b/kernel/drivers/rtc.c @@ -69,23 +69,3 @@ u32 rtc_stamp(void) return timer_get() + rtc.second + rtc.minute * 60 + rtc.hour * 360 + rtc.day * 360 * 24 + rtc.year * 360 * 24 * 365; } - -static res rtc_dev_read(void *buf, u32 offset, u32 count, struct vfs_dev *dev) -{ - UNUSED(offset); - UNUSED(dev); - - u32 stamp = rtc_stamp(); - memcpy_user(buf, &stamp, MIN(count, sizeof(stamp))); - - return MIN(count, sizeof(stamp)); -} - -CLEAR void rtc_install(void) -{ - struct vfs_dev *dev = zalloc(sizeof(*dev)); - dev->name = strdup("rtc"); - dev->type = DEV_CHAR; - dev->read = rtc_dev_read; - /* device_add(dev); */ -} |