#include <lunaix/clock.h>
#include <lunaix/input.h>
+#include <lunaix/mm/page.h>
#include <lunaix/mm/valloc.h>
#include <lunaix/spike.h>
#include <lunaix/status.h>
return sizeof(struct input_evt_pkt);
}
+int
+__input_dev_read_pg(struct device* dev, void* buf, size_t offset)
+{
+ return __input_dev_read(dev, buf, offset, PG_SIZE);
+}
+
struct input_device*
-input_add_device(char* name_fmt, ...)
+input_add_device(struct devclass* class, char* name_fmt, ...)
{
assert(input_devcat);
va_start(args, name_fmt);
struct device* dev =
- device_add(input_devcat, idev, name_fmt, DEV_IFSEQ, args);
+ device_add_vargs(input_devcat, idev, name_fmt, DEV_IFSEQ, class, args);
idev->dev_if = dev;
- dev->read = __input_dev_read;
+ dev->ops.read = __input_dev_read;
+ dev->ops.read_page = __input_dev_read_pg;
va_end(args);