User Tools

Site Tools


마소전략커맨더

This is an old revision of the document!


ID

Bus 002 Device 002: ID 045e:0033 Microsoft Corp. Sidewinder Strategic Commander

LED 켜고 끄기 덤프내용

-- URB_FUNCTION_CLASS_INTERFACE:
  TransferFlags          = 00000000 (USBD_TRANSFER_DIRECTION_OUT, ~USBD_SHORT_TRANSFER_OK)
  TransferBufferLength = 00000003
  TransferBuffer       = 8a545d38
  TransferBufferMDL    = 00000000
    00000000: 02 11 11
  UrbLink                 = 00000000
  RequestTypeReservedBits = 00000022
  Request                 = 00000009
  Value                   = 00000302
  Index                   = 00000000

각 LED에 3bit씩 할당되어 있음. 상하위 바이트의 순서가 뒤집혀 있음

깜박이는 속도

	memcpy(buf, "\x02\x22\x22", 0x0000003);
	ret = usb_control_msg(devh, USB_TYPE_CLASS + USB_RECIP_INTERFACE, 0x0000009, 0x0000302, 0x0000000, buf, 0x0000003, 1000);
  • 021111 : 빠르게
  • 022222 : 느리게

LED ON/OFF

	memcpy(buf, "\x01\xAA\xAA", 0x0000003);
	ret = usb_control_msg(devh, USB_TYPE_CLASS + USB_RECIP_INTERFACE, 0x0000009, 0x0000301, 0x0000000, buf, 0x0000003, 1000);
  • 1번 LED : 01 01 00
  • 1번 LED 깜박임 : 01 02 00
  • 2번 LED : 01 04 00
  • 3번 LED : 01 10 00
  • 4번 LED : 01 40 00
  • 6개 모두 on : 01 55 05
  • 전체 깝박임 : 01 AA AA

references

마소전략커맨더.1257497310.txt.gz · Last modified: 2013/08/03 05:04 (external edit)