source: mainline/uspace/drv/block/usbmast/usbmast.h@ d7f7a4a

Last change on this file since d7f7a4a was d7f7a4a, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 3 years ago

Replace some license headers with SPDX identifier

Headers are replaced using tools/transorm-copyright.sh only
when it can be matched verbatim with the license header used
throughout most of the codebase.

  • Property mode set to 100644
File size: 1.0 KB
Line 
1/*
2 * SPDX-FileCopyrightText: 2011 Jiri Svoboda
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7/** @addtogroup drvusbmast
8 * @{
9 */
10/** @file
11 * USB mass storage commands.
12 */
13
14#ifndef USBMAST_H_
15#define USBMAST_H_
16
17#include <bd_srv.h>
18#include <stddef.h>
19#include <stdint.h>
20#include <usb/usb.h>
21
22/** Mass storage device. */
23typedef struct usbmast_dev {
24 /** USB device */
25 usb_device_t *usb_dev;
26 /** Number of LUNs */
27 unsigned lun_count;
28 /** LUN functions */
29 ddf_fun_t **luns;
30 /** Data read pipe */
31 usb_pipe_t *bulk_in_pipe;
32 /** Data write pipe */
33 usb_pipe_t *bulk_out_pipe;
34} usbmast_dev_t;
35
36/** Mass storage function.
37 *
38 * Serves as soft state for function/LUN.
39 */
40typedef struct {
41 /** Mass storage device the function belongs to */
42 usbmast_dev_t *mdev;
43 /** DDF function */
44 ddf_fun_t *ddf_fun;
45 /** LUN */
46 unsigned lun;
47 /** Total number of blocks */
48 uint64_t nblocks;
49 /** Block size in bytes */
50 size_t block_size;
51 /** Block device service structure */
52 bd_srvs_t bds;
53} usbmast_fun_t;
54
55#endif
56
57/**
58 * @}
59 */
Note: See TracBrowser for help on using the repository browser.