[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avrdude-dev] suggest a "programmer"?
From: |
Joerg Wunsch |
Subject: |
Re: [avrdude-dev] suggest a "programmer"? |
Date: |
Sun, 21 Feb 2016 18:02:14 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
(Short answer only, I'm in a hurry right now.)
As Nicholas Flowers wrote:
> With regard to stk500v2, usb_libusb, how are endpoints selected?
Probably fairly hard-coded right now, but it's possibel to change
that.
Regarding your multi-personality device, what you need is multiple
interfaces. For example, that's how an Atmel mEDBG (embedded
debugger) looks like. It contains three subdevices, a HID (for the
CMSIS-DAP interface), a CDC (connected to a target UART), and the
debugger data gateway, a custom device by Atmel.
# usbconfig -d 5.5 dump_all_config_desc
ugen5.5: <mEDBG CMSIS-DAP ATMEL> at usbus5, cfg=0 md=HOST spd=FULL (12Mbps)
pwr=ON (100mA)
Configuration index 0
bLength = 0x0009
bDescriptorType = 0x0002
wTotalLength = 0x006b
bNumInterfaces = 0x0003
bConfigurationValue = 0x0001
iConfiguration = 0x0000 <no string>
bmAttributes = 0x0080
bMaxPower = 0x0032
Interface 0
bLength = 0x0009
bDescriptorType = 0x0004
bInterfaceNumber = 0x0000
bAlternateSetting = 0x0000
bNumEndpoints = 0x0002
bInterfaceClass = 0x0003
bInterfaceSubClass = 0x0000
bInterfaceProtocol = 0x0000
iInterface = 0x0000 <no string>
Additional Descriptor
bLength = 0x09
bDescriptorType = 0x21
bDescriptorSubType = 0x11
RAW dump:
0x00 | 0x09, 0x21, 0x11, 0x01, 0x00, 0x01, 0x22, 0x23,
0x08 | 0x00
Endpoint 0
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0081 <IN>
bmAttributes = 0x0003 <INTERRUPT>
wMaxPacketSize = 0x0040
bInterval = 0x0001
bRefresh = 0x0000
bSynchAddress = 0x0000
Endpoint 1
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0002 <OUT>
bmAttributes = 0x0003 <INTERRUPT>
wMaxPacketSize = 0x0040
bInterval = 0x0001
bRefresh = 0x0000
bSynchAddress = 0x0000
Additional Descriptor
bLength = 0x08
bDescriptorType = 0x0b
bDescriptorSubType = 0x01
RAW dump:
0x00 | 0x08, 0x0b, 0x01, 0x02, 0x02, 0x02, 0x01, 0x04
Interface 1
bLength = 0x0009
bDescriptorType = 0x0004
bInterfaceNumber = 0x0001
bAlternateSetting = 0x0000
bNumEndpoints = 0x0001
bInterfaceClass = 0x0002
bInterfaceSubClass = 0x0002
bInterfaceProtocol = 0x0001
iInterface = 0x0000 <no string>
Additional Descriptor
bLength = 0x05
bDescriptorType = 0x24
bDescriptorSubType = 0x00
RAW dump:
0x00 | 0x05, 0x24, 0x00, 0x10, 0x01
Additional Descriptor
bLength = 0x04
bDescriptorType = 0x24
bDescriptorSubType = 0x02
RAW dump:
0x00 | 0x04, 0x24, 0x02, 0x06
Additional Descriptor
bLength = 0x05
bDescriptorType = 0x24
bDescriptorSubType = 0x06
RAW dump:
0x00 | 0x05, 0x24, 0x06, 0x01, 0x02
Additional Descriptor
bLength = 0x05
bDescriptorType = 0x24
bDescriptorSubType = 0x01
RAW dump:
0x00 | 0x05, 0x24, 0x01, 0x03, 0x02
Endpoint 0
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0083 <IN>
bmAttributes = 0x0003 <INTERRUPT>
wMaxPacketSize = 0x0040
bInterval = 0x0008
bRefresh = 0x0000
bSynchAddress = 0x0000
Interface 2
bLength = 0x0009
bDescriptorType = 0x0004
bInterfaceNumber = 0x0002
bAlternateSetting = 0x0000
bNumEndpoints = 0x0002
bInterfaceClass = 0x000a
bInterfaceSubClass = 0x0000
bInterfaceProtocol = 0x0000
iInterface = 0x0000 <no string>
Endpoint 0
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0084 <IN>
bmAttributes = 0x0002 <BULK>
wMaxPacketSize = 0x0040
bInterval = 0x0000
bRefresh = 0x0000
bSynchAddress = 0x0000
Endpoint 1
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0005 <OUT>
bmAttributes = 0x0002 <BULK>
wMaxPacketSize = 0x0040
bInterval = 0x0000
bRefresh = 0x0000
bSynchAddress = 0x0000
--
cheers, Joerg .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)
- [avrdude-dev] suggest a "programmer"?, Nicholas Flowers, 2016/02/20
- Re: [avrdude-dev] suggest a "programmer"?, Joerg Wunsch, 2016/02/21
- Re: [avrdude-dev] suggest a "programmer"?, Nicholas Flowers, 2016/02/21
- Re: [avrdude-dev] suggest a "programmer"?, Joerg Wunsch, 2016/02/21
- Re: [avrdude-dev] suggest a "programmer"?, Nicholas Flowers, 2016/02/21
- Re: [avrdude-dev] suggest a "programmer"?, Nicholas Flowers, 2016/02/21
- Re: [avrdude-dev] suggest a "programmer"?,
Joerg Wunsch <=
- Re: [avrdude-dev] suggest a "programmer"?, Nicholas Flowers, 2016/02/21
- Re: [avrdude-dev] suggest a "programmer"?, Joerg Wunsch, 2016/02/21
- Re: [avrdude-dev] suggest a "programmer"?, Nicholas Flowers, 2016/02/21
- Re: [avrdude-dev] suggest a "programmer"?, Nicholas Flowers, 2016/02/24
- Re: [avrdude-dev] suggest a "programmer"?, Nicholas Flowers, 2016/02/25
- Re: [avrdude-dev] suggest a "programmer"?, David Sainty, 2016/02/27
- Re: [avrdude-dev] suggest a "programmer"?, Erik Walthinsen, 2016/02/22
- Re: [avrdude-dev] suggest a "programmer"?, Joerg Wunsch, 2016/02/21