0001
0002
0003
0004
0005
0006 #ifndef __LINUX_USB_IRDA_H
0007 #define __LINUX_USB_IRDA_H
0008
0009
0010
0011 #define USB_SUBCLASS_IRDA 0x02
0012
0013
0014
0015
0016
0017 #define USB_REQ_CS_IRDA_RECEIVING 1
0018 #define USB_REQ_CS_IRDA_CHECK_MEDIA_BUSY 3
0019 #define USB_REQ_CS_IRDA_RATE_SNIFF 4
0020 #define USB_REQ_CS_IRDA_UNICAST_LIST 5
0021 #define USB_REQ_CS_IRDA_GET_CLASS_DESC 6
0022
0023
0024
0025
0026
0027 #define USB_DT_CS_IRDA 0x21
0028
0029
0030
0031
0032
0033 #define USB_IRDA_DS_2048 (1 << 5)
0034 #define USB_IRDA_DS_1024 (1 << 4)
0035 #define USB_IRDA_DS_512 (1 << 3)
0036 #define USB_IRDA_DS_256 (1 << 2)
0037 #define USB_IRDA_DS_128 (1 << 1)
0038 #define USB_IRDA_DS_64 (1 << 0)
0039
0040
0041
0042 #define USB_IRDA_WS_7 (1 << 6)
0043 #define USB_IRDA_WS_6 (1 << 5)
0044 #define USB_IRDA_WS_5 (1 << 4)
0045 #define USB_IRDA_WS_4 (1 << 3)
0046 #define USB_IRDA_WS_3 (1 << 2)
0047 #define USB_IRDA_WS_2 (1 << 1)
0048 #define USB_IRDA_WS_1 (1 << 0)
0049
0050
0051
0052 #define USB_IRDA_MTT_0 (1 << 7)
0053 #define USB_IRDA_MTT_10 (1 << 6)
0054 #define USB_IRDA_MTT_50 (1 << 5)
0055 #define USB_IRDA_MTT_100 (1 << 4)
0056 #define USB_IRDA_MTT_500 (1 << 3)
0057 #define USB_IRDA_MTT_1000 (1 << 2)
0058 #define USB_IRDA_MTT_5000 (1 << 1)
0059 #define USB_IRDA_MTT_10000 (1 << 0)
0060
0061
0062
0063 #define USB_IRDA_BR_4000000 (1 << 8)
0064 #define USB_IRDA_BR_1152000 (1 << 7)
0065 #define USB_IRDA_BR_576000 (1 << 6)
0066 #define USB_IRDA_BR_115200 (1 << 5)
0067 #define USB_IRDA_BR_57600 (1 << 4)
0068 #define USB_IRDA_BR_38400 (1 << 3)
0069 #define USB_IRDA_BR_19200 (1 << 2)
0070 #define USB_IRDA_BR_9600 (1 << 1)
0071 #define USB_IRDA_BR_2400 (1 << 0)
0072
0073
0074
0075 #define USB_IRDA_AB_0 (1 << 7)
0076 #define USB_IRDA_AB_1 (1 << 6)
0077 #define USB_IRDA_AB_2 (1 << 5)
0078 #define USB_IRDA_AB_3 (1 << 4)
0079 #define USB_IRDA_AB_6 (1 << 3)
0080 #define USB_IRDA_AB_12 (1 << 2)
0081 #define USB_IRDA_AB_24 (1 << 1)
0082 #define USB_IRDA_AB_48 (1 << 0)
0083
0084
0085
0086 #define USB_IRDA_RATE_SNIFF 1
0087
0088
0089
0090 struct usb_irda_cs_descriptor {
0091 __u8 bLength;
0092 __u8 bDescriptorType;
0093
0094 __le16 bcdSpecRevision;
0095 __u8 bmDataSize;
0096 __u8 bmWindowSize;
0097 __u8 bmMinTurnaroundTime;
0098 __le16 wBaudRate;
0099 __u8 bmAdditionalBOFs;
0100 __u8 bIrdaRateSniff;
0101 __u8 bMaxUnicastList;
0102 } __attribute__ ((packed));
0103
0104
0105
0106
0107
0108 #define USB_IRDA_STATUS_MEDIA_BUSY (1 << 7)
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125 #define USB_IRDA_STATUS_LINK_SPEED 0x0f
0126
0127 #define USB_IRDA_LS_NO_CHANGE 0
0128 #define USB_IRDA_LS_2400 1
0129 #define USB_IRDA_LS_9600 2
0130 #define USB_IRDA_LS_19200 3
0131 #define USB_IRDA_LS_38400 4
0132 #define USB_IRDA_LS_57600 5
0133 #define USB_IRDA_LS_115200 6
0134 #define USB_IRDA_LS_576000 7
0135 #define USB_IRDA_LS_1152000 8
0136 #define USB_IRDA_LS_4000000 9
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149
0150
0151
0152 #define USB_IRDA_EXTRA_BOFS 0xf0
0153
0154 struct usb_irda_inbound_header {
0155 __u8 bmStatus;
0156 };
0157
0158 struct usb_irda_outbound_header {
0159 __u8 bmChange;
0160 };
0161
0162 #endif
0163