Merge branch 'xxxajk'

This commit is contained in:
Oleg Mazurov 2013-09-09 12:35:41 -06:00
commit bab7d2a9c4
3 changed files with 13 additions and 13 deletions

19
BTD.cpp
View file

@ -110,14 +110,15 @@ uint8_t BTD::Init(uint8_t parent, uint8_t port, bool lowspeed) {
// Assign new address to the device // Assign new address to the device
rcode = pUsb->setAddr(0, 0, bAddress); rcode = pUsb->setAddr(0, 0, bAddress);
if (rcode) { if (rcode) {
p->lowspeed = false; //p->lowspeed = false;
addrPool.FreeAddress(bAddress); //addrPool.FreeAddress(bAddress);
bAddress = 0; //bAddress = 0;
#ifdef DEBUG_USB_HOST #ifdef DEBUG_USB_HOST
Notify(PSTR("\r\nsetAddr: "), 0x80); Notify(PSTR("\r\nsetAddr: "), 0x80);
D_PrintHex<uint8_t > (rcode, 0x80); D_PrintHex<uint8_t > (rcode, 0x80);
#endif #endif
return rcode; goto Fail;
//return rcode;
} }
#ifdef EXTRADEBUG #ifdef EXTRADEBUG
Notify(PSTR("\r\nAddr: "), 0x80); Notify(PSTR("\r\nAddr: "), 0x80);
@ -176,10 +177,12 @@ uint8_t BTD::Init(uint8_t parent, uint8_t port, bool lowspeed) {
#endif #endif
} }
rcode = pUsb->setConf(bAddress, epInfo[ BTD_CONTROL_PIPE ].epAddr, 0); // Reset configuration value //rcode =
pUsb->setAddr(bAddress, 0, 0); // Reset address pUsb->setConf(bAddress, epInfo[ BTD_CONTROL_PIPE ].epAddr, 0); // Reset configuration value
Release(); // Release device goto FailUnknownDevice;
return USB_DEV_CONFIG_ERROR_DEVICE_NOT_SUPPORTED; // Return //pUsb->setAddr(bAddress, 0, 0); // Reset address
//Release(); // Release device
//return USB_DEV_CONFIG_ERROR_DEVICE_NOT_SUPPORTED; // Return
} else { } else {
num_of_conf = ((USB_DEVICE_DESCRIPTOR*)buf)->bNumConfigurations; num_of_conf = ((USB_DEVICE_DESCRIPTOR*)buf)->bNumConfigurations;

View file

@ -27,9 +27,6 @@ e-mail : support@circuitsathome.com
//#define MAX_GPX 8 //#define MAX_GPX 8
#define ON true
#define OFF false
#define SE0 0 #define SE0 0
#define SE1 1 #define SE1 1
#define FSHOST 2 #define FSHOST 2

View file

@ -60,8 +60,8 @@ typedef SPi< Pb7, Pb5, Pb6, Pb4 > spi;
#endif #endif
typedef enum VBUS_t { typedef enum VBUS_t {
on = 0, vbus_on = 0,
off = GPX_VBDET vbus_off = GPX_VBDET
}; };
template< typename SS, typename INTR > class MAX3421e /* : public spi */ { template< typename SS, typename INTR > class MAX3421e /* : public spi */ {