Changeset 676e833 in mainline for uspace/srv/hid


Ignore:
Timestamp:
2017-11-10T14:15:41Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ee98e81
Parents:
7654f3e
Message:

Move receiving side of Msim console to a separate driver. Work around possibility that console character device is not available at the moment input server starts.

Location:
uspace/srv/hid/input
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/input/Makefile

    r7654f3e r676e833  
    4040        port/adb_mouse.c \
    4141        port/chardev.c \
    42         port/msim.c \
    4342        port/niagara.c \
    4443        proto/adb.c \
  • uspace/srv/hid/input/input.c

    r7654f3e r676e833  
    641641#endif
    642642#if defined(MACHINE_msim)
    643         kbd_add_dev(&msim_port, &stty_ctl);
     643        kbd_add_dev(&chardev_port, &stty_ctl);
    644644#endif
    645645#if defined(UARCH_ppc32)
  • uspace/srv/hid/input/kbd_port.h

    r7654f3e r676e833  
    4949extern kbd_port_ops_t adb_port;
    5050extern kbd_port_ops_t chardev_port;
    51 extern kbd_port_ops_t msim_port;
    5251extern kbd_port_ops_t niagara_port;
    5352extern kbd_port_ops_t ns16550_port;
  • uspace/srv/hid/input/port/chardev.c

    r7654f3e r676e833  
    6161        /** S3C24xx UART - Openmoko debug console */
    6262        "char/s3c24xx_uart",
    63         /** Ski console */
     63        /** Ski console, MSIM console */
    6464        "devices/\\hw\\console\\a"
    6565};
     
    7575       
    7676        kbd_dev = kdev;
    77        
     77again:
    7878        for (i = 0; i < num_devs; i++) {
    7979                rc = loc_service_get_id(in_devs[i], &service_id, 0);
     
    8383       
    8484        if (i >= num_devs) {
    85                 printf("%s: Could not find any suitable input device\n", NAME);
    86                 return -1;
     85                /* XXX This is just a hack. */
     86                printf("%s: No input device found, sleep for retry.\n", NAME);
     87                async_usleep(1000 * 1000);
     88                goto again;
    8789        }
    8890       
     
    113115        }
    114116       
     117        printf("%s: Found input device '%s'\n", NAME, in_devs[i]);
    115118        return 0;
    116119}
Note: See TracChangeset for help on using the changeset viewer.