# usbh_enum

## 实验过程

+ 初始化 usb ，将512字节对齐的缓冲区描述符地址传给 usb 。
+ 使能中断，打开 USB_INT_ATTACH中断。
+ 通过中断进入并处理相应的中断，并在中断中实现数据传输，完成枚举过程，包括读取设备描述符，设置设备地址，读取设备字符串描述符。

## 实验结果

usbh_enum example.
attached.
send: 80 06 00 01 00 00 40 00
recv: 12 01 10 01 00 00 00 40
      FE CA 04 40 00 01 01 02
      03 01
send: ZLP.
get device descriptor done.
usb bus has reset.
send: 00 05 01 00 00 00 00 00
recv: ZLP.
set device address done, the address is 0x01.
send: 80 06 00 01 00 00 12 00
recv: 12 01 10 01 00 00 00 40
      FE CA 04 40 00 01 01 02
      03 01
send: ZLP.
get device descriptor done.
send: 80 06 00 03 00 00 FF 00
recv: 04 03 09 04
send: ZLP.
get string descriptor (language) done.
send: 80 06 02 03 09 04 FF 00
recv: 1E 03 54 00 69 00 6E 00
      79 00 55 00 53 00 42 00
      20 00 44 00 65 00 76 00
      69 00 63 00 65 00
send: ZLP.
get string descriptor (manufacturer) done.
enum done.
detached.
