Skip to content

Conversation

neilt6
Copy link
Contributor

@neilt6 neilt6 commented Jun 11, 2014

Added code to reset the device to the initial state when disconnect() is called. This prevents calls to configured() from returning true when the device has been disconnected.

Added code to reset the device to the initial state when disconnect() is called. This prevents calls to configured() from returning true when the device has been disconnected.
@neilt6
Copy link
Contributor Author

neilt6 commented Jun 11, 2014

This is a step towards improving USBDevice for use in battery-operated devices where the USB cable can be disconnected and reconnected at will. Even with this modification, the developer still needs to poll for connection/disconnection in a microcontroller-specific manner and make calls to connect() and disconnect(). Ideally, there should be built-in logic to handle these events with callbacks that can be attached to.

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 12, 2014

Neil, are you planning to add those 2 events?

bogdanm added a commit that referenced this pull request Jun 12, 2014
Reset device to initial state in disconnect()
@bogdanm bogdanm merged commit 1b287bb into ARMmbed:master Jun 12, 2014
@neilt6
Copy link
Contributor Author

neilt6 commented Jun 12, 2014

I'd love to, but unfortunately that's a little bit above my skill level...

bridadan pushed a commit that referenced this pull request Jun 21, 2016
Enable client and nanostack builds.
ccli8 pushed a commit to ccli8/mbed-os that referenced this pull request Sep 24, 2024
* Update STM32H5 HAL driver, fix some DMA bugs

* Disable LL driver

* Add scancode ignore rules

* Update STM32H7 HAL driver to v1.11.3

* Fix some license issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants