마소전략커맨더
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| 마소전략커맨더 [2009/11/06 10:07] – suapapa | 마소전략커맨더 [2013/08/03 05:04] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ID | + | ====== 관련 파일 ====== |
| - | < | + | * drivers/ |
| - | Bus 002 Device 002: ID 045e:0033 Microsoft Corp. Sidewinder Strategic Commander | + | * drivers/ |
| - | </code> | + | * Documentation/usb/ |
| - | 각 LED에 3bit씩 할당되어 있음. 상하위 바이트의 순서가 뒤집혀 있음 | + | ====== HID report ====== |
| + | * / | ||
| + | * / | ||
| - | 깜박이는 속도 | + | ====== references ====== |
| + | *[[http:// | ||
| + | |||
| + | |||
| + | libusb | ||
| + | <code c> | ||
| + | int usb_control_msg(usb_dev_handle *dev, int requesttype, | ||
| + | </ | ||
| + | in kernel | ||
| + | < | ||
| + | /** | ||
| + | * usb_control_msg - Builds a control urb, sends it off and waits for completion | ||
| + | * @dev: pointer to the usb device to send the message to | ||
| + | * @pipe: endpoint " | ||
| + | * @request: USB message request value | ||
| + | * @requesttype: | ||
| + | * @value: USB message value | ||
| + | * @index: USB message index value | ||
| + | * @data: pointer to the data to send | ||
| + | * @size: length in bytes of the data to send | ||
| + | * @timeout: time in msecs to wait for the message to complete before timing | ||
| + | * out (if 0 the wait is forever) | ||
| + | */ | ||
| + | int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request, | ||
| + | __u8 requesttype, | ||
| + | __u16 size, int timeout) | ||
| + | </ | ||
| + | ====== code practice ====== | ||
| + | ===== 깜박이는 속도 | ||
| <code c> | <code c> | ||
| memcpy(buf, | memcpy(buf, | ||
| Line 33: | Line 63: | ||
| *7개 모두 on : 01 55 15 | *7개 모두 on : 01 55 15 | ||
| *전체 깝박임 : 01 AA 2A | *전체 깝박임 : 01 AA 2A | ||
| + | |||
| + | ====== 장치정보 ====== | ||
| + | usb ID | ||
| + | < | ||
| + | Bus 002 Device 002: ID 045e:0033 Microsoft Corp. Sidewinder Strategic Commander | ||
| + | </ | ||
| + | 상세정보 | ||
| + | < | ||
| + | $ sudo lsusb -v -d 045e:0033 | ||
| + | |||
| + | Bus 002 Device 002: ID 045e:0033 Microsoft Corp. Sidewinder Strategic Commander | ||
| + | Device Descriptor: | ||
| + | bLength | ||
| + | bDescriptorType | ||
| + | bcdUSB | ||
| + | bDeviceClass | ||
| + | bDeviceSubClass | ||
| + | bDeviceProtocol | ||
| + | bMaxPacketSize0 | ||
| + | idVendor | ||
| + | idProduct | ||
| + | bcdDevice | ||
| + | iManufacturer | ||
| + | iProduct | ||
| + | iSerial | ||
| + | bNumConfigurations | ||
| + | Configuration Descriptor: | ||
| + | bLength | ||
| + | bDescriptorType | ||
| + | wTotalLength | ||
| + | bNumInterfaces | ||
| + | bConfigurationValue | ||
| + | iConfiguration | ||
| + | bmAttributes | ||
| + | (Bus Powered) | ||
| + | Remote Wakeup | ||
| + | MaxPower | ||
| + | Interface Descriptor: | ||
| + | bLength | ||
| + | bDescriptorType | ||
| + | bInterfaceNumber | ||
| + | bAlternateSetting | ||
| + | bNumEndpoints | ||
| + | bInterfaceClass | ||
| + | bInterfaceSubClass | ||
| + | bInterfaceProtocol | ||
| + | iInterface | ||
| + | HID Device Descriptor: | ||
| + | bLength | ||
| + | bDescriptorType | ||
| + | bcdHID | ||
| + | bCountryCode | ||
| + | bNumDescriptors | ||
| + | bDescriptorType | ||
| + | wDescriptorLength | ||
| + | Report Descriptor: (length is 190) | ||
| + | Item(Global): | ||
| + | Generic Desktop Controls | ||
| + | Item(Local ): Usage, data= [ 0x00 ] 0 | ||
| + | Undefined | ||
| + | Item(Main | ||
| + | Application | ||
| + | Item(Global): | ||
| + | Item(Local ): Usage, data= [ 0x01 ] 1 | ||
| + | Pointer | ||
| + | Item(Main | ||
| + | Physical | ||
| + | Item(Global): | ||
| + | Generic Desktop Controls | ||
| + | Item(Local ): Usage, data= [ 0x30 ] 48 | ||
| + | Direction-X | ||
| + | Item(Local ): Usage, data= [ 0x31 ] 49 | ||
| + | Direction-Y | ||
| + | Item(Local ): Usage, data= [ 0x35 ] 53 | ||
| + | Rotate-Z | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Main | ||
| + | Data Variable Absolute No_Wrap Linear | ||
| + | Preferred_State No_Null_Position Non_Volatile Bitfield | ||
| + | Item(Main | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Main | ||
| + | Constant Array Absolute No_Wrap Linear | ||
| + | Preferred_State No_Null_Position Non_Volatile Bitfield | ||
| + | Item(Global): | ||
| + | Buttons | ||
| + | Item(Local ): Usage Minimum, data= [ 0x01 ] 1 | ||
| + | Button 1 (Primary) | ||
| + | Item(Local ): Usage Maximum, data= [ 0x0c ] 12 | ||
| + | (null) | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Main | ||
| + | Data Variable Absolute No_Wrap Linear | ||
| + | Preferred_State No_Null_Position Non_Volatile Bitfield | ||
| + | Item(Global): | ||
| + | Buttons | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Local ): Usage, data= [ 0x0d ] 13 | ||
| + | (null) | ||
| + | Item(Local ): Usage, data= [ 0x0e ] 14 | ||
| + | (null) | ||
| + | Item(Local ): Usage, data= [ 0x0f ] 15 | ||
| + | (null) | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Main | ||
| + | Data Array Absolute No_Wrap Linear | ||
| + | No_Preferred_State No_Null_Position Non_Volatile Bitfield | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Main | ||
| + | Constant Array Absolute No_Wrap Linear | ||
| + | Preferred_State No_Null_Position Non_Volatile Bitfield | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | LEDs | ||
| + | Item(Local ): Usage Minimum, data= [ 0x4b ] 75 | ||
| + | Generic Indicator | ||
| + | Item(Main | ||
| + | Logical | ||
| + | Item(Local ): Usage Minimum, data= [ 0x49 ] 73 | ||
| + | Indicator Green | ||
| + | Item(Main | ||
| + | Logical | ||
| + | Item(Local ): Usage, data= [ 0x3c ] 60 | ||
| + | Usage Multi Indicator | ||
| + | Item(Main | ||
| + | Logical | ||
| + | Item(Local ): Usage, data= [ 0x41 ] 65 | ||
| + | Indicator Off | ||
| + | Item(Local ): Usage, data= [ 0x3d ] 61 | ||
| + | Indicator On | ||
| + | Item(Local ): Usage, data= [ 0x40 ] 64 | ||
| + | Indicator Fast Blink | ||
| + | Item(Main | ||
| + | Data Array Absolute No_Wrap Linear | ||
| + | No_Preferred_State Null_State Non_Volatile Bitfield | ||
| + | Item(Main | ||
| + | Item(Main | ||
| + | Item(Main | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | LEDs | ||
| + | Item(Local ): Usage Minimum, data= [ 0x4b ] 75 | ||
| + | Generic Indicator | ||
| + | Item(Main | ||
| + | Logical | ||
| + | Item(Local ): Usage Minimum, data= [ 0x48 ] 72 | ||
| + | Indicator Red | ||
| + | Item(Main | ||
| + | Logical | ||
| + | Item(Local ): Usage, data= [ 0x3c ] 60 | ||
| + | Usage Multi Indicator | ||
| + | Item(Main | ||
| + | Logical | ||
| + | Item(Local ): Usage, data= [ 0x41 ] 65 | ||
| + | Indicator Off | ||
| + | Item(Local ): Usage, data= [ 0x3d ] 61 | ||
| + | Indicator On | ||
| + | Item(Local ): Usage, data= [ 0x40 ] 64 | ||
| + | Indicator Fast Blink | ||
| + | Item(Main | ||
| + | Data Array Absolute No_Wrap Linear | ||
| + | No_Preferred_State Null_State Non_Volatile Bitfield | ||
| + | Item(Main | ||
| + | Item(Main | ||
| + | Item(Main | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Main | ||
| + | Constant Array Absolute No_Wrap Linear | ||
| + | Preferred_State No_Null_Position Non_Volatile Bitfield | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | Item(Global): | ||
| + | System: SI Linear, Unit: Seconds | ||
| + | Item(Global): | ||
| + | Unit Exponent: 2 | ||
| + | Item(Local ): Usage, data= [ 0x45 ] 69 | ||
| + | Fast Blink On Time | ||
| + | Item(Main | ||
| + | Data Array Absolute No_Wrap Linear | ||
| + | No_Preferred_State Null_State Non_Volatile Bitfield | ||
| + | Item(Local ): Usage, data= [ 0x46 ] 70 | ||
| + | Fast Blink Off Time | ||
| + | Item(Main | ||
| + | Data Array Absolute No_Wrap Linear | ||
| + | No_Preferred_State Null_State Non_Volatile Bitfield | ||
| + | Item(Main | ||
| + | Endpoint Descriptor: | ||
| + | bLength | ||
| + | bDescriptorType | ||
| + | bEndpointAddress | ||
| + | bmAttributes | ||
| + | Transfer Type Interrupt | ||
| + | Synch Type None | ||
| + | Usage Type Data | ||
| + | wMaxPacketSize | ||
| + | bInterval | ||
| + | Device Status: | ||
| + | (Bus Powered) | ||
| + | </ | ||
| + | |||
| ====== references ====== | ====== references ====== | ||
마소전략커맨더.1257502030.txt.gz · Last modified: 2013/08/03 05:04 (external edit)