USB Connect/Disconnect Hooks
Moderators: RoccoMarco, lbednarz, tfAteba
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: USB Connect/Disconnect Hooks
You get a callback on enumeration, you could try sensing the 5V for insertion (using EXT may be) if your board supports that.
Giovanni
Giovanni
Re: USB Connect/Disconnect Hooks
Giovanni wrote:You get a callback on enumeration, you could try sensing the 5V for insertion (using EXT may be) if your board supports that.
Giovanni
what callback is that ? the usb_event ?
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: USB Connect/Disconnect Hooks
The USB driver does not support callbacks for insertion. You can use the EXT driver IF the 5V can be detected on an input pin.
Giovanni
Giovanni
Re: USB Connect/Disconnect Hooks
Is there any technical reason why having connect / disconnect notification in the driver is an issue ?
To me it seems logical to have this ? i know the ST driver as something to support this
To me it seems logical to have this ? i know the ST driver as something to support this
Re: USB Connect/Disconnect Hooks
In my case I just connect the 5v USB to an npn transistor and use it to pull a gpio down.
When the gpio goes down I call usbConnectBus which pulls D+ up using a pin, and vice versa.
Works fine using the pal or exti driver
When the gpio goes down I call usbConnectBus which pulls D+ up using a pin, and vice versa.
Works fine using the pal or exti driver
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: USB Connect/Disconnect Hooks
Tabulous wrote:Is there any technical reason why having connect / disconnect notification in the driver is an issue ?
To me it seems logical to have this ? i know the ST driver as something to support this
Because the feature is not necessarily present in the USB peripheral.
Giovanni