PCに挿入されたusb-Uディスクの浅い分析生命の開始段階[軟硬]--列挙過程(gliethttp)


PC usb-U _ [ ]-- (gliethttp)

:http://gliethttp.cublog.cn[ ]

pc usb usb , pc , , host slave ,
U :
1) U pc USB ,U D+ , pc usb host , USB ,
  U host reset .
  [ :gliethttp
   PDIUSBD12 SoftConnec , , D+ 1.5k ;
   AT91RM9200 , io DP(D+) , pc host .
  ]
2)host D+ , pc ,pc host , reset , .
3)U host reset , U ,U usb 0
  [ :gliethttp
    pc host " " ,U usb pc
    0 .
  ]
4)pc , 1 " "setup ,
   windows , 1 " "setup 0x40, :64 ,
   windows 64 " " , , " " , 18 ,
   windows , pc host , 64
   , host " " windows usb ,
  " " :
  1>usb , :U , , IN 1 " ",
  2>usb , :U , " ", u usb endp0, 0 8
     16 64 , U " " 8 、 16 18 .
  windows " " ,windows host ,
   usb , :U , , , 8 、16 、 18 ,
   , usb , usb , 8 " " , 8
  usb , :u , endp0 0 , " " , .
5)pc usb , " "setup , 0,
   usb , (0,127] .
6)usb , :U , " "setup , , U usb ,
   ,pc usb , 0 .
7) pc ,usb ,usb endp0 0 4)
   , pc 0 、 ,
  pc 2 " "setup , ,pc 0
   、 , :18
   :
   usb , :U , 4) , endp0 0 8 ,
   pc 2 , : , " "setup ,pc 8 ,
   , IN ,(18+ (8-1)) / 8 = 3[gliethttp],
   2 " "setup ,pc usb 8、8 2 , 3 ,
   3 IN .
8)usb , :U , " "setup , 0 setup ,
   , bmRequestType&0x80 , pc[gliethttp]
   host OUT , IN ,usb setup .
9) ," "," ""," ""," " .