Changeset eb522e8 in mainline for uspace/drv/usbhid/subdrivers.c


Ignore:
Timestamp:
2011-06-01T08:43:42Z (15 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8d6c1f1
Parents:
9e2e715 (diff), e51a514 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Huuuuuge merge from development - all the work actually :)

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhid/subdrivers.c

    r9e2e715 reb522e8  
    11/*
    2  * Copyright (c) 2009 Lukas Mejdrech
     2 * Copyright (c) 2011 Lubos Slovak
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup libnet
     29/** @addtogroup drvusbhid
    3030 * @{
    3131 */
     32/** @file
     33 * USB HID subdriver mappings.
     34 */
    3235
    33 #ifndef LIBNET_NETIF_INTERFACE_H_
    34 #define LIBNET_NETIF_INTERFACE_H_
     36#include "subdrivers.h"
     37#include <usb/hid/usages/core.h>
     38#include <usb/hid/hidpath.h>
    3539
    36 #include <netif_remote.h>
    37 #include <packet_client.h>
     40#include "multimedia/multimedia.h"
     41#include "mouse/mousedev.h"
     42#include "generic/hiddev.h"
    3843
    39 #define netif_module_message    netif_module_message_standalone
    40 #define netif_module_start      netif_module_start_standalone
    41 #define netif_get_addr_req      netif_get_addr_req_remote
    42 #define netif_probe_req         netif_probe_req_remote
    43 #define netif_send_msg          netif_send_msg_remote
    44 #define netif_start_req         netif_start_req_remote
    45 #define netif_stop_req          netif_stop_req_remote
    46 #define netif_stats_req         netif_stats_req_remote
    47 #define netif_bind_service      netif_bind_service_remote
     44static usb_hid_subdriver_usage_t path_kbd[] = {
     45        {USB_HIDUT_PAGE_GENERIC_DESKTOP,
     46         USB_HIDUT_USAGE_GENERIC_DESKTOP_KEYBOARD},
     47        {0, 0}
     48};
    4849
    49 #endif
     50static usb_hid_subdriver_usage_t path_mouse[] = {
     51        {USB_HIDUT_PAGE_GENERIC_DESKTOP, USB_HIDUT_USAGE_GENERIC_DESKTOP_MOUSE},
     52        {0, 0}
     53};
    5054
    51 /** @}
     55static usb_hid_subdriver_usage_t multim_key_path[] = {
     56        {USB_HIDUT_PAGE_CONSUMER, USB_HIDUT_USAGE_CONSUMER_CONSUMER_CONTROL},
     57        {0, 0}
     58};
     59
     60const usb_hid_subdriver_mapping_t usb_hid_subdrivers[] = {
     61        {
     62                path_kbd,
     63                0,
     64                USB_HID_PATH_COMPARE_BEGIN,
     65                -1,
     66                -1,
     67                {
     68                        .init = usb_kbd_init,
     69                        .deinit = usb_kbd_deinit,
     70                        .poll = usb_kbd_polling_callback,
     71                        .poll_end = NULL
     72                },
     73               
     74        },
     75        {
     76                multim_key_path,
     77                1,
     78                USB_HID_PATH_COMPARE_BEGIN,
     79                -1,
     80                -1,
     81                {
     82                        .init = usb_multimedia_init,
     83                        .deinit = usb_multimedia_deinit,
     84                        .poll = usb_multimedia_polling_callback,
     85                        .poll_end = NULL
     86                }
     87        },
     88        {
     89                path_mouse,
     90                0,
     91                USB_HID_PATH_COMPARE_BEGIN,
     92                -1,
     93                -1,
     94                {
     95                        .init = usb_mouse_init,
     96                        .deinit = usb_mouse_deinit,
     97                        .poll = usb_mouse_polling_callback,
     98                        .poll_end = NULL
     99                }
     100        },
     101        {NULL, -1, 0, -1, -1, {NULL, NULL, NULL, NULL, NULL}}
     102};
     103
     104/**
     105 * @}
    52106 */
Note: See TracChangeset for help on using the changeset viewer.