Changeset f2d88f3 in mainline for uspace/drv/hid/atkbd/atkbd.c


Ignore:
Timestamp:
2019-01-04T21:22:17Z (5 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
af7b85b
Parents:
06412ba
Message:

Add forgotten changes to enable non-blocking chardev read

File:
1 edited

Legend:

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

    r06412ba rf2d88f3  
    211211        while (true) {
    212212                uint8_t code = 0;
    213                 rc = chardev_read(kbd->chardev, &code, 1, &nwr);
     213                rc = chardev_read(kbd->chardev, &code, 1, &nwr, chardev_f_none);
    214214                if (rc != EOK)
    215215                        return EIO;
     
    222222                        map_size = sizeof(scanmap_e0) / sizeof(unsigned int);
    223223
    224                         rc = chardev_read(kbd->chardev, &code, 1, &nwr);
     224                        rc = chardev_read(kbd->chardev, &code, 1, &nwr,
     225                            chardev_f_none);
    225226                        if (rc != EOK)
    226227                                return EIO;
    227228                } else if (code == KBD_SCANCODE_SET_EXTENDED_SPECIAL) {
    228                         rc = chardev_read(kbd->chardev, &code, 1, &nwr);
     229                        rc = chardev_read(kbd->chardev, &code, 1, &nwr,
     230                            chardev_f_none);
    229231                        if (rc != EOK)
    230232                                return EIO;
     
    232234                                continue;
    233235
    234                         rc = chardev_read(kbd->chardev, &code, 1, &nwr);
     236                        rc = chardev_read(kbd->chardev, &code, 1, &nwr,
     237                            chardev_f_none);
    235238                        if (rc != EOK)
    236239                                return EIO;
     
    238241                                continue;
    239242
    240                         rc = chardev_read(kbd->chardev, &code, 1, &nwr);
     243                        rc = chardev_read(kbd->chardev, &code, 1, &nwr,
     244                            chardev_f_none);
    241245                        if (rc != EOK)
    242246                                return EIO;
     
    244248                                continue;
    245249
    246                         rc = chardev_read(kbd->chardev, &code, 1, &nwr);
     250                        rc = chardev_read(kbd->chardev, &code, 1, &nwr,
     251                            chardev_f_none);
    247252                        if (rc != EOK)
    248253                                return EIO;
     
    250255                                continue;
    251256
    252                         rc = chardev_read(kbd->chardev, &code, 1, &nwr);
     257                        rc = chardev_read(kbd->chardev, &code, 1, &nwr,
     258                            chardev_f_none);
    253259                        if (rc != EOK)
    254260                                return EIO;
     
    256262                                continue;
    257263
    258                         rc = chardev_read(kbd->chardev, &code, 1, &nwr);
     264                        rc = chardev_read(kbd->chardev, &code, 1, &nwr,
     265                            chardev_f_none);
    259266                        if (rc != EOK)
    260267                                return EIO;
     
    262269                                continue;
    263270
    264                         rc = chardev_read(kbd->chardev, &code, 1, &nwr);
     271                        rc = chardev_read(kbd->chardev, &code, 1, &nwr,
     272                            chardev_f_none);
    265273                        if (rc != EOK)
    266274                                return EIO;
     
    277285                if (code == KBD_SCANCODE_KEY_RELEASE) {
    278286                        type = KEY_RELEASE;
    279                         rc = chardev_read(kbd->chardev, &code, 1, &nwr);
     287                        rc = chardev_read(kbd->chardev, &code, 1, &nwr,
     288                            chardev_f_none);
    280289                        if (rc != EOK)
    281290                                return EIO;
     
    418427                return EIO;
    419428        }
    420         rc = chardev_read(kbd->chardev, &code, 1, &bytes);
     429        rc = chardev_read(kbd->chardev, &code, 1, &bytes,
     430            chardev_f_none);
    421431        if (rc != EOK || code != AT_KBD_ACK) {
    422432                ddf_msg(LVL_ERROR, "Failed to confirm keyboard enable: %hhx.",
Note: See TracChangeset for help on using the changeset viewer.