Ignore:
Timestamp:
2017-11-13T18:07:46Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0dd4779
Parents:
56763a4
Message:

Move ADB keyboard and mouse support to separate drivers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/adb/cuda_adb/cuda_adb.c

    r56763a4 ra2afd8f  
    109109};
    110110
    111 static int cuda_dev_create(cuda_t *cuda, const char *name, adb_dev_t **rdev)
     111static int cuda_dev_create(cuda_t *cuda, const char *name, const char *id,
     112    adb_dev_t **rdev)
    112113{
    113114        adb_dev_t *dev = NULL;
     
    115116        int rc;
    116117
    117         fun = ddf_fun_create(cuda->dev, fun_exposed, name);
     118        fun = ddf_fun_create(cuda->dev, fun_inner, name);
    118119        if (fun == NULL) {
    119120                ddf_msg(LVL_ERROR, "Failed creating function '%s'.", name);
     121                rc = ENOMEM;
     122                goto error;
     123        }
     124
     125        rc = ddf_fun_add_match_id(fun, id, 10);
     126        if (rc != EOK) {
     127                ddf_msg(LVL_ERROR, "Failed adding match ID.");
    120128                rc = ENOMEM;
    121129                goto error;
     
    156164        cuda->phys_base = res->base;
    157165
    158         rc = cuda_dev_create(cuda, "kbd", &kbd);
     166        rc = cuda_dev_create(cuda, "kbd", "adb/keyboard", &kbd);
    159167        if (rc != EOK)
    160168                goto error;
    161169
    162         rc = cuda_dev_create(cuda, "mouse", &mouse);
     170        rc = cuda_dev_create(cuda, "mouse", "adb/mouse", &mouse);
    163171        if (rc != EOK)
    164172                goto error;
Note: See TracChangeset for help on using the changeset viewer.