Ignore:
Timestamp:
2012-02-24T19:07:44Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a76b01b4
Parents:
5837c7a
Message:

usb drivers: remove optical separators

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbhid/kbd/kbddev.c

    r5837c7a r76fbd9a  
    7373static void default_connection_handler(ddf_fun_t *, ipc_callid_t, ipc_call_t *);
    7474static ddf_dev_ops_t kbdops = { .default_handler = default_connection_handler };
    75 /*----------------------------------------------------------------------------*/
     75
    7676
    7777static const unsigned DEFAULT_ACTIVE_MODS = KM_NUM_LOCK;
     
    8888static const unsigned int DEFAULT_REPEAT_DELAY = 50 * 1000;
    8989
    90 /*----------------------------------------------------------------------------*/
     90
    9191/** Keyboard polling endpoint description for boot protocol class. */
    9292const usb_endpoint_description_t usb_hid_kbd_poll_endpoint_description = {
     
    103103
    104104static void usb_kbd_set_led(usb_hid_dev_t *hid_dev, usb_kbd_t *kbd_dev);
    105 /*----------------------------------------------------------------------------*/
     105
    106106static const uint8_t USB_KBD_BOOT_REPORT_DESCRIPTOR[] = {
    107107        0x05, 0x01,  /* Usage Page (Generic Desktop), */
     
    138138        0xC0         /* End Collection */
    139139};
    140 /*----------------------------------------------------------------------------*/
     140
    141141typedef enum usb_kbd_flags {
    142142        USB_KBD_STATUS_UNINITIALIZED = 0,
     
    144144        USB_KBD_STATUS_TO_DESTROY = -1
    145145} usb_kbd_flags;
    146 /*----------------------------------------------------------------------------*/
     146
    147147/* IPC method handler                                                         */
    148 /*----------------------------------------------------------------------------*/
     148
    149149/**
    150150 * Default handler for IPC methods not handled by DDF.
     
    208208
    209209}
    210 /*----------------------------------------------------------------------------*/
     210
    211211/* Key processing functions                                                   */
    212 /*----------------------------------------------------------------------------*/
     212
    213213/**
    214214 * Handles turning of LED lights on and off.
     
    283283        }
    284284}
    285 /*----------------------------------------------------------------------------*/
     285
    286286/** Send key event.
    287287 *
     
    308308        }
    309309}
    310 /*----------------------------------------------------------------------------*/
     310
    311311static inline int usb_kbd_is_lock(unsigned int key_code)
    312312{
     
    315315            || key_code == KC_CAPS_LOCK);
    316316}
    317 /*----------------------------------------------------------------------------*/
     317
    318318static size_t find_in_array_int32(int32_t val, int32_t *arr, size_t arr_size)
    319319{
     
    326326        return (size_t) -1;
    327327}
    328 /*----------------------------------------------------------------------------*/
     328
    329329/**
    330330 * Checks if some keys were pressed or released and generates key events.
     
    409409        usb_log_debug2("Stored keys %s.\n", key_buffer);
    410410}
    411 /*----------------------------------------------------------------------------*/
     411
    412412/* General kbd functions                                                      */
    413 /*----------------------------------------------------------------------------*/
     413
    414414/**
    415415 * Processes data received from the device in form of report.
     
    481481        usb_kbd_check_key_changes(hid_dev, kbd_dev);
    482482}
    483 /*----------------------------------------------------------------------------*/
     483
    484484/* HID/KBD structure manipulation                                             */
    485 /*----------------------------------------------------------------------------*/
     485
    486486static int usb_kbd_create_function(usb_kbd_t *kbd_dev)
    487487{
     
    537537        return EOK;
    538538}
    539 /*----------------------------------------------------------------------------*/
     539
    540540/* API functions                                                              */
    541 /*----------------------------------------------------------------------------*/
     541
    542542/**
    543543 * Initialization of the USB/HID keyboard structure.
     
    701701        return EOK;
    702702}
    703 /*----------------------------------------------------------------------------*/
     703
    704704bool usb_kbd_polling_callback(usb_hid_dev_t *hid_dev, void *data)
    705705{
     
    715715        return true;
    716716}
    717 /*----------------------------------------------------------------------------*/
     717
    718718int usb_kbd_is_initialized(const usb_kbd_t *kbd_dev)
    719719{
    720720        return (kbd_dev->initialized == USB_KBD_STATUS_INITIALIZED);
    721721}
    722 /*----------------------------------------------------------------------------*/
     722
    723723int usb_kbd_is_ready_to_destroy(const usb_kbd_t *kbd_dev)
    724724{
    725725        return (kbd_dev->initialized == USB_KBD_STATUS_TO_DESTROY);
    726726}
    727 /*----------------------------------------------------------------------------*/
     727
    728728/**
    729729 * Properly destroys the USB/HID keyboard structure.
     
    766766        free(kbd_dev);
    767767}
    768 /*----------------------------------------------------------------------------*/
     768
    769769void usb_kbd_deinit(usb_hid_dev_t *hid_dev, void *data)
    770770{
     
    779779        }
    780780}
    781 /*----------------------------------------------------------------------------*/
     781
    782782int usb_kbd_set_boot_protocol(usb_hid_dev_t *hid_dev)
    783783{
Note: See TracChangeset for help on using the changeset viewer.