-
Notifications
You must be signed in to change notification settings - Fork 0
/
xhci_trb.hpp
57 lines (50 loc) · 1.28 KB
/
xhci_trb.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#pragma once
namespace bitnos::xhci
{
union TRB
{
uint32_t dwords[4];
struct
{
uint64_t parameter : 64;
uint32_t status : 32;
uint32_t cycle_bit : 1;
uint32_t evaluate_next_trb : 1;
uint32_t : 8;
uint32_t trb_type : 6;
uint32_t : 16;
} bits;
};
union ConfigureEndpointCommandTRB
{
uint32_t dwords[4];
struct
{
uint32_t : 4;
uint64_t input_context_pointer : 60;
uint32_t : 32;
uint32_t cycle_bit : 1;
uint32_t : 8;
uint32_t deconfigure : 1;
uint32_t trb_type : 6;
uint32_t : 8;
uint32_t slot_id : 8;
} bits;
};
union CommandCompletionEventTRB
{
uint32_t dwords[4];
struct
{
uint32_t : 4;
uint64_t command_trb_pointer : 60;
uint32_t command_completion_parameter : 24;
uint32_t completion_code : 8;
uint32_t cycle_bit : 1;
uint32_t : 9;
uint32_t trb_type : 6;
uint32_t vf_id : 8;
uint32_t slot_id : 8;
} bits;
};
}