|
15 | 15 | * @ingroup kernel_drivers_abstract |
16 | 16 | * |
17 | 17 | * Mouse devices are exposed as a `/dev/mouse/[id]/` directory, containing the below files. |
18 | | - * |
| 18 | + * |
19 | 19 | * ## name |
20 | | - * |
| 20 | + * |
21 | 21 | * A read-only file that contains the driver defined name of the mouse device. |
22 | | - * |
| 22 | + * |
23 | 23 | * ## events |
24 | | - * |
25 | | - * A readable and pollable file that provides a stream of mouse events represented as integer values suffixed with a single character indicating the type of the event. |
26 | | - * |
27 | | - * The ´x` and `y` characters indicate movement in the X and Y directions respectively, the `_` and `^` represent a button press and release respectively, and the `z` character represents a scroll event. |
28 | | - * |
29 | | - * Buttons are represented as their button number starting from `1` where `1` is the left button, `2` is the right button, and `3` is the middle button. |
30 | | - * |
31 | | - * The below example shows a press of the left mouse button, moving the mouse `10` units in the X direction and `-5` units in the Y direction, releasing the left mouse button, and then scrolling `3` units. |
32 | | - * |
| 24 | + * |
| 25 | + * A readable and pollable file that provides a stream of mouse events represented as integer values suffixed with a |
| 26 | + * single character indicating the type of the event. |
| 27 | + * |
| 28 | + * The ´x` and `y` characters indicate movement in the X and Y directions respectively, the `_` and `^` represent a |
| 29 | + * button press and release respectively, and the `z` character represents a scroll event. |
| 30 | + * |
| 31 | + * Buttons are represented as their button number starting from `1` where `1` is the left button, `2` is the right |
| 32 | + * button, and `3` is the middle button. |
| 33 | + * |
| 34 | + * The below example shows a press of the left mouse button, moving the mouse `10` units in the X direction and `-5` |
| 35 | + * units in the Y direction, releasing the left mouse button, and then scrolling `3` units. |
| 36 | + * |
33 | 37 | * ``` |
34 | 38 | * 1_10x-5y1^3z |
35 | 39 | * ``` |
36 | | - * |
| 40 | + * |
37 | 41 | * If no events are available to read, the read call will block until an event is available unless the file is opened in |
38 | 42 | * non-blocking mode in which case the read will fail with `EAGAIN`. |
39 | 43 | * |
40 | | - * @note The format is specified such that if `scan()` is used with "%u%c" the `scan()` call does not require any "ungets". |
| 44 | + * @note The format is specified such that if `scan()` is used with "%u%c" the `scan()` call does not require any |
| 45 | + * "ungets". |
41 | 46 | * |
42 | 47 | * @{ |
43 | 48 | */ |
@@ -93,39 +98,39 @@ void mouse_free(mouse_t* mouse); |
93 | 98 |
|
94 | 99 | /** |
95 | 100 | * @brief Push a mouse button press event to the mouse event queue. |
96 | | - * |
| 101 | + * |
97 | 102 | * @param mouse Pointer to the mouse structure. |
98 | 103 | * @param button Button to press. |
99 | 104 | */ |
100 | 105 | void mouse_press(mouse_t* mouse, uint32_t button); |
101 | 106 |
|
102 | 107 | /** |
103 | 108 | * @brief Push a mouse button release event to the mouse event queue. |
104 | | - * |
| 109 | + * |
105 | 110 | * @param mouse Pointer to the mouse structure. |
106 | 111 | * @param button Button to release. |
107 | 112 | */ |
108 | 113 | void mouse_release(mouse_t* mouse, uint32_t button); |
109 | 114 |
|
110 | 115 | /** |
111 | 116 | * @brief Push a mouse movement in the X direction to the mouse event queue. |
112 | | - * |
| 117 | + * |
113 | 118 | * @param mouse Pointer to the mouse structure. |
114 | 119 | * @param delta Amount to move in the X direction. |
115 | 120 | */ |
116 | 121 | void mouse_move_x(mouse_t* mouse, int64_t delta); |
117 | 122 |
|
118 | 123 | /** |
119 | 124 | * @brief Push a mouse movement in the Y direction to the mouse event queue. |
120 | | - * |
| 125 | + * |
121 | 126 | * @param mouse Pointer to the mouse structure. |
122 | 127 | * @param delta Amount to move in the Y direction. |
123 | 128 | */ |
124 | 129 | void mouse_move_y(mouse_t* mouse, int64_t delta); |
125 | 130 |
|
126 | 131 | /** |
127 | 132 | * @brief Push a mouse scroll event to the mouse event queue. |
128 | | - * |
| 133 | + * |
129 | 134 | * @param mouse Pointer to the mouse structure. |
130 | 135 | * @param delta Amount to scroll. |
131 | 136 | */ |
|
0 commit comments