Changeset 26e7d6d in mainline for uspace/drv/bus/usb/usbmast/usbmast.h


Ignore:
Timestamp:
2011-09-19T16:31:00Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a347a11
Parents:
3842a955 (diff), 086290d (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 mainline changes

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbmast/usbmast.h

    r3842a955 r26e7d6d  
    11/*
    2  * Copyright (c) 2006 Josef Cejka
     2 * Copyright (c) 2011 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup kbdgen
    30  * @brief HelenOS generic uspace keyboard handler.
    31  * @ingroup kbd
     29/** @addtogroup drvusbmast
    3230 * @{
    3331 */
    3432/** @file
     33 * USB mass storage commands.
    3534 */
    3635
    37 #ifndef __KEYBUFFER_H__
    38 #define __KEYBUFFER_H__
     36#ifndef USBMAST_H_
     37#define USBMAST_H_
    3938
    4039#include <sys/types.h>
    41 #include <io/console.h>
    42 #include <bool.h>
     40#include <usb/usb.h>
    4341
    44 /** Size of buffer for pressed keys */
    45 #define KEYBUFFER_SIZE  128
     42/** Mass storage device. */
     43typedef struct {
     44        /** DDF device */
     45        ddf_dev_t *ddf_dev;
     46        /** USB device */
     47        usb_device_t *usb_dev;
     48        /** Number of LUNs */
     49        unsigned luns;
     50} usbmast_dev_t;
    4651
     52/** Mass storage function.
     53 *
     54 * Serves as soft state for function/LUN.
     55 */
    4756typedef struct {
    48         kbd_event_t fifo[KEYBUFFER_SIZE];
    49         size_t head;
    50         size_t tail;
    51         size_t items;
    52 } keybuffer_t;
    53 
    54 extern void keybuffer_free(keybuffer_t *);
    55 extern void keybuffer_init(keybuffer_t *);
    56 extern size_t keybuffer_available(keybuffer_t *);
    57 extern bool keybuffer_empty(keybuffer_t *);
    58 extern void keybuffer_push(keybuffer_t *, const kbd_event_t *);
    59 extern bool keybuffer_pop(keybuffer_t *, kbd_event_t *);
     57        /** Mass storage device the function belongs to */
     58        usbmast_dev_t *mdev;
     59        /** DDF function */
     60        ddf_fun_t *ddf_fun;
     61        /** LUN */
     62        unsigned lun;
     63        /** Total number of blocks */
     64        uint64_t nblocks;
     65        /** Block size in bytes */
     66        size_t block_size;
     67} usbmast_fun_t;
    6068
    6169#endif
Note: See TracChangeset for help on using the changeset viewer.