[Fx2lib-devel] Toggle reset on clearing stall
Status: Beta
Brought to you by:
mulicheng
From: Daniel O'C. <doc...@gs...> - 2011-02-24 01:54:30
|
Hi, I found a bug in handle_clear_feature - it doesn't reset the data toggle which can cause confusion in some cases. The following diff appears to fix it for me diff --git a/lib/setupdat.c b/lib/setupdat.c index f4c217a..c3d7c43 100644 --- a/lib/setupdat.c +++ b/lib/setupdat.c @@ -216,6 +216,7 @@ BOOL handle_clear_feature() { __xdata BYTE* pep=ep_addr(SETUPDAT[4]); printf ( "unstall endpoint %02X\n" , SETUPDAT[4] ); *pep &= ~bmEPSTALL; + RESETTOGGLE(SETUPDAT[4]); } else { printf ( "unsupported ep feature %02x", SETUPDAT[2] ); return FALSE; -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C |