Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/hid/ps2mouse/ps2mouse.c

    rb7fd2a0 rc657bd7  
    3636#include <stdbool.h>
    3737#include <errno.h>
    38 #include <str_error.h>
    3938#include <ddf/log.h>
    4039#include <io/keycode.h>
     
    7776        uint8_t data = 0; \
    7877        size_t nread; \
    79         const errno_t rc = chardev_read((mouse)->chardev, &data, 1, &nread); \
     78        const int rc = chardev_read((mouse)->chardev, &data, 1, &nread); \
    8079        if (rc != EOK) { \
    81                 ddf_msg(LVL_ERROR, "Failed reading byte: %s", str_error_name(rc));\
     80                ddf_msg(LVL_ERROR, "Failed reading byte: %d", rc);\
    8281                return rc; \
    8382        } \
     
    9493        uint8_t data = (value); \
    9594        size_t nwr; \
    96         const errno_t rc = chardev_write((mouse)->chardev, &data, 1, &nwr); \
     95        const int rc = chardev_write((mouse)->chardev, &data, 1, &nwr); \
    9796        if (rc != EOK) { \
    98                 ddf_msg(LVL_ERROR, "Failed writing byte: %s", str_error_name(rc)); \
     97                ddf_msg(LVL_ERROR, "Failed writing byte: %d", rc); \
    9998                return rc; \
    10099        } \
    101100} while (0)
    102101
    103 static errno_t polling_ps2(void *);
    104 static errno_t polling_intellimouse(void *);
    105 static errno_t probe_intellimouse(ps2_mouse_t *, bool);
     102static int polling_ps2(void *);
     103static int polling_intellimouse(void *);
     104static int probe_intellimouse(ps2_mouse_t *, bool);
    106105static void default_connection_handler(ddf_fun_t *, ipc_callid_t, ipc_call_t *);
    107106
     
    120119 * @return EOK on success or non-zero error code
    121120 */
    122 errno_t ps2_mouse_init(ps2_mouse_t *mouse, ddf_dev_t *dev)
     121int ps2_mouse_init(ps2_mouse_t *mouse, ddf_dev_t *dev)
    123122{
    124123        async_sess_t *parent_sess;
    125124        bool bound = false;
    126         errno_t rc;
     125        int rc;
    127126
    128127        mouse->client_sess = NULL;
     
    165164
    166165        /* Probe IntelliMouse extensions. */
    167         errno_t (*polling_f)(void*) = polling_ps2;
     166        int (*polling_f)(void*) = polling_ps2;
    168167        if (probe_intellimouse(mouse, false) == EOK) {
    169168                ddf_msg(LVL_NOTE, "Enabled IntelliMouse extensions");
     
    223222 * @return EOK on success or non-zero error code
    224223 */
    225 static errno_t ps2_mouse_read_packet(ps2_mouse_t *mouse, void *pbuf, size_t psize)
    226 {
    227         errno_t rc;
     224static int ps2_mouse_read_packet(ps2_mouse_t *mouse, void *pbuf, size_t psize)
     225{
     226        int rc;
    228227        size_t pos;
    229228        size_t nread;
     
    248247 * @return Never.
    249248 */
    250 errno_t polling_ps2(void *arg)
     249int polling_ps2(void *arg)
    251250{
    252251        ps2_mouse_t *mouse = (ps2_mouse_t *) arg;
    253         errno_t rc;
     252        int rc;
    254253
    255254        bool buttons[PS2_BUTTON_COUNT] = {};
     
    300299 * @return Never.
    301300 */
    302 static errno_t polling_intellimouse(void *arg)
     301static int polling_intellimouse(void *arg)
    303302{
    304303        ps2_mouse_t *mouse = (ps2_mouse_t *) arg;
    305         errno_t rc;
     304        int rc;
    306305
    307306        bool buttons[INTELLIMOUSE_BUTTON_COUNT] = {};
     
    373372 * See http://www.computer-engineering.org/ps2mouse/ for details.
    374373 */
    375 static errno_t probe_intellimouse(ps2_mouse_t *mouse, bool buttons)
     374static int probe_intellimouse(ps2_mouse_t *mouse, bool buttons)
    376375{
    377376        MOUSE_WRITE_BYTE(mouse, PS2_MOUSE_SET_SAMPLE_RATE);
Note: See TracChangeset for help on using the changeset viewer.