|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef USBPNDEFINITIONS_H |
|
20 #define USBPNDEFINITIONS_H |
|
21 |
|
22 // INCLUDES |
|
23 // CONSTANTS |
|
24 |
|
25 // Name of the server thread |
|
26 _LIT( KUsbPnServerName, "USBPNServer" ); |
|
27 |
|
28 const TInt KPnNumInterfaces = 2; // dummy and data interfaces |
|
29 const TUint KUsbPnRequiredNumberOfEndpoints = 2; |
|
30 |
|
31 // Lengths of the Pn descriptor. |
|
32 const TInt KPnInterfaceDescriptorLength = 9; |
|
33 const TInt KPnDataClassEndpointInDescriptorLength = 7; |
|
34 const TInt KPnDataClassEndpointOutDescriptorLength = 7; |
|
35 const TInt KPnHeaderFunctionalDescriptorLength = 5; |
|
36 const TInt KPnFunctionalDescriptorLength = 3; |
|
37 const TInt KPnUnionFunctionalDescriptorLength = 5; |
|
38 |
|
39 // Total length of descriptor |
|
40 const TInt KPnDescriptorLength = |
|
41 KPnHeaderFunctionalDescriptorLength + |
|
42 KPnFunctionalDescriptorLength + |
|
43 KPnUnionFunctionalDescriptorLength + |
|
44 KPnInterfaceDescriptorLength + // dummy |
|
45 KPnInterfaceDescriptorLength + // data alt 0 |
|
46 KPnInterfaceDescriptorLength + // data alt 1 |
|
47 KPnDataClassEndpointInDescriptorLength + |
|
48 KPnDataClassEndpointOutDescriptorLength; |
|
49 |
|
50 // Interface descriptions |
|
51 _LIT(KUsbPnCommIfc, "UsbPnComm"); |
|
52 _LIT(KUsbPnDataAlt0Ifc, "UsbPnDataAlt0"); |
|
53 _LIT(KUsbPnDataAlt1Ifc, "UsbPnDataAlt1"); |
|
54 |
|
55 // Communication class PHONET model Interface descriptor |
|
56 const TInt KCommInterfaceClass = 2; |
|
57 const TInt KCommInterfaceSubClass = 0xFE; |
|
58 const TInt KCommInterfaceProtocol = 0; |
|
59 |
|
60 // Data Class Interface Descriptor for PHONET |
|
61 const TInt KDataInterfaceClass = 0x0A; |
|
62 const TInt KDataInterfaceSubClass = 0x0; |
|
63 const TInt KDataInterfaceProtocol = 0; |
|
64 |
|
65 // PHONET communication class header functional descriptor |
|
66 const TInt KHeaderDescriptorSubType = 0x0; |
|
67 const TInt8 KCDCVersionNumber[2] = { 0x01, 0x10 }; |
|
68 |
|
69 // PHONET model functional descriptor |
|
70 const TInt KFunctionalDescriptorSubType = 0xAB; |
|
71 |
|
72 // PHONET union functional descriptor |
|
73 const TInt KUnionDescriptorSubType = 0x6; |
|
74 |
|
75 // Vendor DMA |
|
76 const TInt KVendorDMAFDDescriptorLength = 4; |
|
77 const TInt KVendorDMADescriptorSubType = 0xfd; |
|
78 const TInt KDmaCapabilities = 0; |
|
79 |
|
80 // Panic category |
|
81 _LIT( KUsbPnPanicCat, "USB Phonet Link" ); |
|
82 |
|
83 // Circular buffet packet size |
|
84 const TInt KPnPacketSize = 512; |
|
85 |
|
86 // Packet count of IsaSender |
|
87 const TInt KPnIsaPacketCount = 4; |
|
88 |
|
89 // Packet count of UsbSender |
|
90 const TInt KPnUsbPacketCount = 20; |
|
91 |
|
92 enum TUsbPnClientMessage |
|
93 { |
|
94 EPnDetach |
|
95 }; |
|
96 |
|
97 // MACROS |
|
98 // DATA TYPES |
|
99 // FUNCTION PROTOTYPES |
|
100 // FORWARD DECLARATIONS |
|
101 // CLASS DECLARATION |
|
102 |
|
103 #endif // USBPNDEFINITIONS_H |
|
104 // End of File |