[Concept,03/14] mouse: Add comment for mouse_get_event()
Commit Message
From: Simon Glass <sjg@chromium.org>
Document the mouse_get_event() function to explain what it does and its
return values.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
---
include/mouse.h | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
@@ -86,11 +86,35 @@ struct mouse_event {
};
struct mouse_ops {
+ /**
+ * mouse_get_event() - Get a mouse event
+ *
+ * Gets the next available mouse event from the device. This can be a
+ * motion event (mouse movement) or a button event (button press or
+ * release).
+ *
+ * @dev: Mouse device
+ * @event: Returns the mouse event
+ * Returns: 0 if OK, -EAGAIN if no event available, -ENOSYS if not
+ * supported
+ */
int (*get_event)(struct udevice *dev, struct mouse_event *event);
};
#define mouse_get_ops(dev) ((struct mouse_ops *)(dev)->driver->ops)
+/**
+ * mouse_get_event() - Get a mouse event
+ *
+ * Gets the next available mouse event from the device. This can be a
+ * motion event (mouse movement) or a button event (button press or
+ * release).
+ *
+ * @dev: Mouse device
+ * @event: Returns the mouse event
+ * Returns: 0 if OK, -EAGAIN if no event available, -ENOSYS if not
+ * supported
+ */
int mouse_get_event(struct udevice *dev, struct mouse_event *event);
/**