leaflabs / libmaple

[INACTIVE] C and C++ library for STM32 ARM Cortex-M3 development boards.
http://leaflabs.com/docs/libmaple.html
Other
304 stars 218 forks source link

Preserve previous usb state when suspending / restore on resume #75

Closed wesen closed 11 years ago

wesen commented 11 years ago

A suspended device would not recover correctly after a USB suspend/resume event. The USB code from STM didn't track the previous state and would leave the device USB_SUSPENDED. I haven't gone too far into how the suspend works, but this should do it for both INTERNAL and EXTERNAL resumes.

wesen commented 11 years ago

I hope I got the indenting right, and sign off. that would be the first pull-req that is correct from the start :)

mbolivar commented 11 years ago

Looks good; merged. Thanks!