Changes in uspace/drv/hid/ps2mouse/ps2mouse.c [b7fd2a0:dd8ab1c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/hid/ps2mouse/ps2mouse.c
rb7fd2a0 rdd8ab1c 77 77 uint8_t data = 0; \ 78 78 size_t nread; \ 79 const errno_t rc = chardev_read((mouse)->chardev, &data, 1, &nread); \79 const int rc = chardev_read((mouse)->chardev, &data, 1, &nread); \ 80 80 if (rc != EOK) { \ 81 81 ddf_msg(LVL_ERROR, "Failed reading byte: %s", str_error_name(rc));\ … … 94 94 uint8_t data = (value); \ 95 95 size_t nwr; \ 96 const errno_t rc = chardev_write((mouse)->chardev, &data, 1, &nwr); \96 const int rc = chardev_write((mouse)->chardev, &data, 1, &nwr); \ 97 97 if (rc != EOK) { \ 98 98 ddf_msg(LVL_ERROR, "Failed writing byte: %s", str_error_name(rc)); \ … … 101 101 } while (0) 102 102 103 static errno_t polling_ps2(void *);104 static errno_t polling_intellimouse(void *);105 static errno_t probe_intellimouse(ps2_mouse_t *, bool);103 static int polling_ps2(void *); 104 static int polling_intellimouse(void *); 105 static int probe_intellimouse(ps2_mouse_t *, bool); 106 106 static void default_connection_handler(ddf_fun_t *, ipc_callid_t, ipc_call_t *); 107 107 … … 120 120 * @return EOK on success or non-zero error code 121 121 */ 122 errno_t ps2_mouse_init(ps2_mouse_t *mouse, ddf_dev_t *dev)122 int ps2_mouse_init(ps2_mouse_t *mouse, ddf_dev_t *dev) 123 123 { 124 124 async_sess_t *parent_sess; 125 125 bool bound = false; 126 errno_t rc;126 int rc; 127 127 128 128 mouse->client_sess = NULL; … … 165 165 166 166 /* Probe IntelliMouse extensions. */ 167 errno_t (*polling_f)(void*) = polling_ps2;167 int (*polling_f)(void*) = polling_ps2; 168 168 if (probe_intellimouse(mouse, false) == EOK) { 169 169 ddf_msg(LVL_NOTE, "Enabled IntelliMouse extensions"); … … 223 223 * @return EOK on success or non-zero error code 224 224 */ 225 static errno_t ps2_mouse_read_packet(ps2_mouse_t *mouse, void *pbuf, size_t psize)226 { 227 errno_t rc;225 static int ps2_mouse_read_packet(ps2_mouse_t *mouse, void *pbuf, size_t psize) 226 { 227 int rc; 228 228 size_t pos; 229 229 size_t nread; … … 248 248 * @return Never. 249 249 */ 250 errno_t polling_ps2(void *arg)250 int polling_ps2(void *arg) 251 251 { 252 252 ps2_mouse_t *mouse = (ps2_mouse_t *) arg; 253 errno_t rc;253 int rc; 254 254 255 255 bool buttons[PS2_BUTTON_COUNT] = {}; … … 300 300 * @return Never. 301 301 */ 302 static errno_t polling_intellimouse(void *arg)302 static int polling_intellimouse(void *arg) 303 303 { 304 304 ps2_mouse_t *mouse = (ps2_mouse_t *) arg; 305 errno_t rc;305 int rc; 306 306 307 307 bool buttons[INTELLIMOUSE_BUTTON_COUNT] = {}; … … 373 373 * See http://www.computer-engineering.org/ps2mouse/ for details. 374 374 */ 375 static errno_t probe_intellimouse(ps2_mouse_t *mouse, bool buttons)375 static int probe_intellimouse(ps2_mouse_t *mouse, bool buttons) 376 376 { 377 377 MOUSE_WRITE_BYTE(mouse, PS2_MOUSE_SET_SAMPLE_RATE);
Note:
See TracChangeset
for help on using the changeset viewer.