source: mainline/uspace/drv/bus/usb/ehci/hw_struct/iso_transfer_descriptor.h

Last change on this file was c477c80, checked in by Jiri Svoboda <jiri@…>, 7 years ago

Fix some common misspellings

  • Property mode set to 100644
File size: 3.1 KB
Line 
1/*
2 * Copyright (c) 2013 Jan Vesely
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28/** @addtogroup drvusbehci
29 * @{
30 */
31/** @file
32 * @brief EHCI driver
33 */
34#ifndef DRV_EHCI_HW_STRUCT_ISO_TRANSFER_DESCRIPTOR_H
35#define DRV_EHCI_HW_STRUCT_ISO_TRANSFER_DESCRIPTOR_H
36
37#include <stdint.h>
38#include "link_pointer.h"
39
40/** Isochronous transfer descriptor (HS only) */
41typedef struct itd {
42 link_pointer_t next;
43
44 volatile uint32_t transaction[8];
45 volatile uint32_t buffer_pointer[7];
46
47 /* 64 bit struct only */
48 volatile uint32_t extended_bp[7];
49} __attribute__((packed, aligned(32))) itd_t;
50
51/*
52 * itd_t.transaction
53 */
54#define ITD_TRANSACTION_STATUS_ACTIVE_FLAG (1 << 31)
55#define ITD_TRANSACTION_STATUS_BUFFER_ERROR_FLAG (1 << 30)
56#define ITD_TRANSACTION_STATUS_BABBLE_FLAG (1 << 29)
57#define ITD_TRANSACTION_STATUS_TRANS_ERROR_FLAG (1 << 28)
58#define ITD_TRANSACTION_LENGTH_MASK 0xfff
59#define ITD_TRANSACTION_LENGTH_SHIFT 16
60#define ITD_TRANSACTION_IOC_FLAG (1 << 15)
61#define ITD_TRANSACTION_PG_MASK 0x3
62#define ITD_TRANSACTION_PG_SHIFT 12
63#define ITD_TRANSACTION_OFFSET_MASK 0xfff
64#define ITD_TRANSACTION_OFFSET_SHIFT 0
65
66/*
67 * itd_t.buffer_pointer
68 */
69#define ITD_BUFFER_POINTER_MASK 0xfffff000
70/* First buffer pointer */
71#define ITD_BUFFER_POINTER_EP_MASK 0xf
72#define ITD_BUFFER_POINTER_EP_SHIFT 8
73#define ITD_BUFFER_POINTER_ADDR_MASK 0x3f
74#define ITD_BUFFER_POINTER_ADDR_SHIFT 0
75/* Second buffer pointer */
76#define ITD_BUFFER_POINTER_IN_FLAG (1 << 11)
77#define ITD_BUFFER_POINTER_MAX_PACKET_MASK 0x3ff
78#define ITD_BUFFER_POINTER_MAX_PACKET_SHIFT 0
79/* Third buffer pointer */
80#define ITD_BUFFER_POINTER_MULTI_MASK 0x3
81#define ITD_BUFFER_POINTER_MULTI_SHIFT 0
82
83#endif
84
85/**
86 * @}
87 */
Note: See TracBrowser for help on using the repository browser.