Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 1e94e09 in mainline


Ignore:
Timestamp:
2014-05-16T23:34:14Z (8 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master
Children:
b5674b2
Parents:
7d68e5c7
Message:

implement driver support for blink(1) USB LED devices
add simple LED device DDF interface

Location:
uspace
Files:
7 added
7 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbhid/Makefile

    r7d68e5c7 r1e94e09  
    5050        mouse/mousedev.c \
    5151        multimedia/multimedia.c \
    52         multimedia/keymap.c
     52        multimedia/keymap.c \
     53        blink1/blink1.c
    5354
    5455SOURCES = \
  • uspace/drv/bus/usb/usbhid/subdrivers.c

    r7d68e5c7 r1e94e09  
    3737#include <usb/hid/usages/core.h>
    3838#include <usb/hid/hidpath.h>
    39 
     39#include "kbd/kbddev.h"
     40#include "mouse/mousedev.h"
    4041#include "multimedia/multimedia.h"
    41 #include "mouse/mousedev.h"
     42#include "blink1/blink1.h"
    4243#include "generic/hiddev.h"
    4344
    4445static const usb_hid_subdriver_usage_t path_kbd[] = {
    45         {USB_HIDUT_PAGE_GENERIC_DESKTOP,
    46          USB_HIDUT_USAGE_GENERIC_DESKTOP_KEYBOARD},
     46        {
     47                USB_HIDUT_PAGE_GENERIC_DESKTOP,
     48                USB_HIDUT_USAGE_GENERIC_DESKTOP_KEYBOARD
     49        },
    4750        {0, 0}
    4851};
    4952
    5053static const usb_hid_subdriver_usage_t path_mouse[] = {
    51         {USB_HIDUT_PAGE_GENERIC_DESKTOP, USB_HIDUT_USAGE_GENERIC_DESKTOP_MOUSE},
     54        {
     55                USB_HIDUT_PAGE_GENERIC_DESKTOP,
     56                USB_HIDUT_USAGE_GENERIC_DESKTOP_MOUSE
     57        },
    5258        {0, 0}
    5359};
    5460
    55 static const usb_hid_subdriver_usage_t multim_key_path[] = {
    56         {USB_HIDUT_PAGE_CONSUMER, USB_HIDUT_USAGE_CONSUMER_CONSUMER_CONTROL},
     61static const usb_hid_subdriver_usage_t path_multim_key[] = {
     62        {
     63                USB_HIDUT_PAGE_CONSUMER,
     64                USB_HIDUT_USAGE_CONSUMER_CONSUMER_CONTROL
     65        },
    5766        {0, 0}
    5867};
     
    7382        },
    7483        {
    75                 multim_key_path,
     84                path_multim_key,
    7685                1,
    7786                USB_HID_PATH_COMPARE_BEGIN,
     
    98107                }
    99108        },
     109        {
     110                NULL,
     111                0,
     112                USB_HID_PATH_COMPARE_BEGIN,
     113                0x27b8,
     114                0x01ed,
     115                {
     116                        .init = usb_blink1_init,
     117                        .deinit = usb_blink1_deinit,
     118                        .poll = NULL,
     119                        .poll_end = NULL
     120                }
     121        }
    100122};
    101123
  • uspace/lib/c/Makefile

    r7d68e5c7 r1e94e09  
    6565        generic/device/pio_window.c \
    6666        generic/device/clock_dev.c \
     67        generic/device/led_dev.c \
    6768        generic/dhcp.c \
    6869        generic/dnsr.c \
  • uspace/lib/c/include/ipc/dev_iface.h

    r7d68e5c7 r1e94e09  
    6565        CLOCK_DEV_IFACE,
    6666
     67        /** Interface provided by LED devices */
     68        LED_DEV_IFACE,
     69
    6770        /** Interface provided by battery powered devices */
    6871        BATTERY_DEV_IFACE,
  • uspace/lib/drv/Makefile

    r7d68e5c7 r1e94e09  
    5454        generic/remote_usbhid.c \
    5555        generic/remote_clock_dev.c \
     56        generic/remote_led_dev.c \
    5657        generic/remote_battery_dev.c \
    5758        generic/remote_ahci.c
  • uspace/lib/drv/generic/dev_iface.c

    r7d68e5c7 r1e94e09  
    4343#include "remote_char_dev.h"
    4444#include "remote_clock_dev.h"
     45#include "remote_led_dev.h"
    4546#include "remote_battery_dev.h"
    4647#include "remote_graph_dev.h"
     
    6869                [USBHID_DEV_IFACE] = &remote_usbhid_iface,
    6970                [CLOCK_DEV_IFACE] = &remote_clock_dev_iface,
     71                [LED_DEV_IFACE] = &remote_led_dev_iface,
    7072                [BATTERY_DEV_IFACE] = &remote_battery_dev_iface,
    7173                [AHCI_DEV_IFACE] = &remote_ahci_iface,
  • uspace/srv/locsrv/locsrv.c

    r7d68e5c7 r1e94e09  
    13321332        categ_dir_add_cat(&cdir, cat);
    13331333
     1334        cat = category_new("led");
     1335        categ_dir_add_cat(&cdir, cat);
     1336
    13341337        cat = category_new("serial");
    13351338        categ_dir_add_cat(&cdir, cat);
Note: See TracChangeset for help on using the changeset viewer.