A lua based USB descriptor generate tool, source code on GitHub. How to use the descriptor? Demo for TeenyUSB, Demo for libOpenCM3.
Lua format descriptor |
==> |
C Code |
USB Core Type: MaxEp: MaxMem: | File name: | |
return Device {
strManufacturer = "TeenyUSB",
strProduct = "TeenyUSB Composite DEMO",
strSerial = "TUSB123456",
idVendor = 0x0483,
idProduct = 0x0011,
prefix = "COMP",
Config {
USB_HID{
ReadEp = EndPoint(IN(2), Interrupt, 16),
WriteEp = EndPoint(OUT(2), Interrupt, 16),
report = HID_InOut(16),
},
CDC_ACM{
EndPoint(IN(8), Interrupt, 16),
EndPoint(IN(1), BulkDouble, 32),
EndPoint(OUT(1), BulkDouble, 32),
},
Interface{
WCID=WinUSB,
strInterface = "TeenyUSB WinUSB",
GUID="{1D4B2365-4749-48EA-B38A-7C6FDDDD7E26}",
EndPoint(IN(3), BulkDouble, 32),
EndPoint(OUT(3), BulkDouble, 32),
},
Interface{
bInterfaceClass = 0x08, -- MSC
bInterfaceSubClass = 0x06, -- SCSI
bInterfaceProtocol = 0x50, -- BOT
EndPoint(IN(4), BulkDouble, 64),
EndPoint(OUT(4), BulkDouble, 64),
},
}
}
|
Sample Desc
Color Style
|
Log
The code editor is ACE
The Lua parser is fengari