Changeset c2772b8 in mainline


Ignore:
Timestamp:
2011-01-30T22:06:09Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
707ffcf
Parents:
54b5625 (diff), a09128c (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:

Merge development/ changes

Files:
2 added
1 deleted
11 edited
11 moved

Legend:

Unmodified
Added
Removed
  • .bzrignore

    r54b5625 rc2772b8  
    8686./uspace/drv/uhci/uhci
    8787./uspace/drv/usbhub/usbhub
    88 ./uspace/drv/usbkbd/usbkbd
     88./uspace/drv/usbhid/usbhid
    8989./uspace/drv/vhc/vhc
    9090./uspace/srv/bd/ata_bd/ata_bd
  • boot/arch/amd64/Makefile.inc

    r54b5625 rc2772b8  
    4545        uhci \
    4646        usbhub \
    47         usbkbd \
     47        usbhid \
    4848        vhc
    4949
  • uspace/Makefile

    r54b5625 rc2772b8  
    118118                srv/hw/irc/i8259 \
    119119                drv/uhci \
     120                drv/usbhid \
    120121                drv/usbhub \
    121                 drv/usbkbd \
    122122                drv/vhc
    123123endif
     
    132132                srv/hw/irc/i8259 \
    133133                drv/uhci \
     134                drv/usbhid \
    134135                drv/usbhub \
    135                 drv/usbkbd \
    136136                drv/vhc
    137137endif
  • uspace/app/usbinfo/dump.c

    r54b5625 rc2772b8  
    2727 */
    2828
    29 /** @addtogroup usb
     29/** @addtogroup usbinfo
    3030 * @{
    3131 */
    3232/**
    3333 * @file
    34  * @brief USB querying.
     34 * USB querying.
    3535 */
    3636
  • uspace/app/usbinfo/info.c

    r54b5625 rc2772b8  
    2727 */
    2828
    29 /** @addtogroup usb
     29/** @addtogroup usbinfo
    3030 * @{
    3131 */
    3232/**
    3333 * @file
    34  * @brief
     34 * Dumping of generic device properties.
    3535 */
    3636#include <stdio.h>
  • uspace/app/usbinfo/main.c

    r54b5625 rc2772b8  
    2727 */
    2828
    29 /** @addtogroup usb
     29/** @addtogroup usbinfo
    3030 * @{
    3131 */
    3232/**
    3333 * @file
    34  * @brief USB querying.
     34 * USB querying.
    3535 */
    3636
  • uspace/app/usbinfo/usbinfo.h

    r54b5625 rc2772b8  
    2727 */
    2828
    29 /** @addtogroup usb
     29/** @addtogroup usbinfo
    3030 * @{
    3131 */
    3232/** @file
    33  * @brief Common header for usbinfo application.
     33 * Common header for usbinfo application.
    3434 */
    3535#ifndef USBINFO_USBINFO_H_
  • uspace/doc/doxygroups.h

    r54b5625 rc2772b8  
    210210                 */
    211211
    212          /**
    213           * @defgroup drvusbhub USB hub driver
    214           * @ingroup usb
    215           * @brief USB hub driver.
    216           */
    217 
    218          /**
    219           * @defgroup drvusbhid USB HID driver
    220           * @ingroup usb
    221           * @brief USB driver for HID devices.
    222           */
    223 
    224          /**
    225           * @defgroup drvusbuhci UHCI driver
    226           * @ingroup usb
    227           * @brief Driver for USB host controller UHCI.
    228           */
    229 
     212        /**
     213         * @defgroup usbinfo USB info application
     214         * @ingroup usb
     215         * @brief Application for querying USB devices.
     216         * @details
     217         * The intended usage of this application is to query new USB devices
     218         * for their descriptors etc. to simplify driver writing.
     219         */
     220
     221        /**
     222         * @defgroup drvusbhub USB hub driver
     223         * @ingroup usb
     224         * @brief USB hub driver.
     225         */
     226
     227        /**
     228         * @defgroup drvusbhid USB HID driver
     229         * @ingroup usb
     230         * @brief USB driver for HID devices.
     231         */
     232
     233        /**
     234         * @defgroup drvusbuhci UHCI driver
     235         * @ingroup usb
     236         * @brief Driver for USB host controller UHCI.
     237         */
     238
  • uspace/drv/uhci/Makefile

    r54b5625 rc2772b8  
    3434SOURCES = \
    3535        main.c \
     36        pci.c \
    3637        transfers.c
    3738
  • uspace/drv/uhci/main.c

    r54b5625 rc2772b8  
    3030#include <usb/debug.h>
    3131#include <errno.h>
     32#include <str_error.h>
    3233#include <driver.h>
    3334#include "uhci.h"
     
    5556        usb_dprintf(NAME, 1, "uhci_add_device() called\n");
    5657        device->ops = &uhci_ops;
     58
     59        uintptr_t io_reg_base;
     60        size_t io_reg_size;
     61        int irq;
     62
     63        int rc = pci_get_my_registers(device,
     64            &io_reg_base, &io_reg_size, &irq);
     65
     66        if (rc != EOK) {
     67                fprintf(stderr,
     68                    NAME ": failed to get I/O registers addresses: %s.\n",
     69                    str_error(rc));
     70                return rc;
     71        }
     72
     73        usb_dprintf(NAME, 2, "I/O regs at 0x%X (size %zu), IRQ %d.\n",
     74            io_reg_base, io_reg_size, irq);
    5775
    5876        /*
  • uspace/drv/uhci/uhci.h

    r54b5625 rc2772b8  
    2727 */
    2828
    29 /** @addtogroup usb
     29/** @addtogroup drvusbuhci
    3030 * @{
    3131 */
     
    4242usbhc_iface_t uhci_iface;
    4343
     44int pci_get_my_registers(device_t *, uintptr_t *, size_t *, int *);
     45
    4446#endif
    4547/**
  • uspace/drv/usbhid/Makefile

    r54b5625 rc2772b8  
    11#
    2 # Copyright (c) 2010 Vojtech Horky
     2# Copyright (c) 2010-2011 Vojtech Horky
    33# All rights reserved.
    44#
     
    3030LIBS = $(LIBDRV_PREFIX)/libdrv.a $(LIBUSB_PREFIX)/libusb.a
    3131EXTRA_CFLAGS += -I$(LIBDRV_PREFIX)/include -I$(LIBUSB_PREFIX)/include -I.
    32 BINARY = usbkbd
    33 SRV_KBD = $(USPACE_PREFIX)/srv/hid/kbd
     32BINARY = usbhid
     33
     34STOLEN_LAYOUT_SOURCES = \
     35        layout/us_qwerty.c \
     36        layout/us_dvorak.c \
     37        layout/cz.c
    3438
    3539SOURCES = \
     
    3842        descdump.c \
    3943        conv.c \
    40         us_qwerty.c \
    41         us_dvorak.c \
    42         cz.c
     44        $(STOLEN_LAYOUT_SOURCES)
     45
     46EXTRA_CLEAN = $(STOLEN_LAYOUT_SOURCES)
     47
     48SRV_KBD = $(USPACE_PREFIX)/srv/hid/kbd
    4349
    4450include $(USPACE_PREFIX)/Makefile.common
    4551
    46 us_qwerty.c:
    47         ln -snf $(SRV_KBD)/layout/$@ $@
    48 
    49 us_dvorak.c:
    50         ln -snf $(SRV_KBD)/layout/$@ $@
    51 
    52 cz.c:
    53         ln -snf $(SRV_KBD)/layout/$@ $@
    54 
    55 
     52layout/%.c: $(SRV_KBD)/layout/%.c
     53        ln -sfn ../$< $@
  • uspace/drv/usbhid/conv.c

    r54b5625 rc2772b8  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
     28
     29/** @addtogroup drvusbhid
     30 * @{
     31 */
     32/** @file
     33 * USB scancode parser.
     34 */
     35
    2836#include <io/keycode.h>
    2937#include <stdint.h>
     
    185193        return key;
    186194}
     195
     196/**
     197 * @}
     198 */
  • uspace/drv/usbhid/conv.h

    r54b5625 rc2772b8  
    2727 */
    2828
    29 /** @addtogroup usb
     29/** @addtogroup drvusbhid
    3030 * @{
    3131 */
    3232/** @file
    33  * @brief USB Scancode parser.
     33 * USB scancode parser.
    3434 */
    3535
     
    4040
    4141#endif
     42
     43/**
     44 * @}
     45 */
  • uspace/drv/usbhid/descdump.c

    r54b5625 rc2772b8  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
     28
    2829/** @addtogroup drvusbhid
    2930 * @{
     31 */
     32/** @file
     33 * Descriptor dumping.
    3034 */
    3135
  • uspace/drv/usbhid/descdump.h

    r54b5625 rc2772b8  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
     28
    2829/** @addtogroup drvusbhid
    2930 * @{
    3031 */
     32/** @file
     33 * Descriptor dumping.
     34 */
     35
    3136#ifndef USBHID_DESCDUMP_H_
    3237#define USBHID_DESCDUMP_H_
  • uspace/drv/usbhid/descparser.c

    r54b5625 rc2772b8  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
     28
    2829/** @addtogroup drvusbhid
    2930 * @{
     31 */
     32/** @file
     33 * Descriptor parser.
    3034 */
    3135
  • uspace/drv/usbhid/descparser.h

    r54b5625 rc2772b8  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
     28
    2829/** @addtogroup drvusbhid
    2930 * @{
     31 */
     32/** @file
     33 * Descriptor parser.
    3034 */
    3135
  • uspace/drv/usbhid/layout.h

    r54b5625 rc2772b8  
    11/*
     2 * Copyright (c) 2009 Jiri Svoboda
    23 * Copyright (c) 2011 Lubos Slovak
    34 * (copied from /uspace/srv/hid/kbd/include/layout.h)
     
    2829 */
    2930
    30 /** @addtogroup usb
    31  * @brief
    32  * @ingroup
     31/** @addtogroup drvusbhid
    3332 * @{
    3433 */
    3534/** @file
     35 * Keyboard layout.
    3636 */
    3737
  • uspace/drv/usbhid/main.c

    r54b5625 rc2772b8  
    11/*
    22 * Copyright (c) 2010 Vojtech Horky
     3 * Copyright (c) 2011 Lubos Slovak
    34 * All rights reserved.
    45 *
     
    2627 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2728 */
     29
    2830/** @addtogroup drvusbhid
    2931 * @{
    3032 */
     33/**
     34 * @file
     35 * Main routines of USB HID driver.
     36 */
     37
    3138#include <usb/usbdrv.h>
    3239#include <driver.h>
     
    4956
    5057#define BUFFER_SIZE 32
    51 #define NAME "usbkbd"
     58#define NAME "usbhid"
    5259
    5360#define GUESSED_POLL_ENDPOINT 1
Note: See TracChangeset for help on using the changeset viewer.