Combined constructors

This commit is contained in:
Kristian Lauszus 2012-05-24 14:39:01 +02:00
parent 71dcc7e534
commit 73427c0384
2 changed files with 2 additions and 22 deletions

View file

@ -62,25 +62,6 @@ bPollEnable(false) // don't start polling before dongle is connected
my_bdaddr[0] = btadr0; my_bdaddr[0] = btadr0;
} }
PS3BT::PS3BT(USB *p):
pUsb(p), // pointer to USB class instance - mandatory
bAddress(0), // device address - mandatory
bNumEP(1), // if config descriptor needs to be parsed
qNextPollTime(0),
bPollEnable(false) // don't start polling before dongle is connected
{
for(uint8_t i=0; i<PS3_MAX_ENDPOINTS; i++)
{
epInfo[i].epAddr = 0;
epInfo[i].maxPktSize = (i) ? 0 : 8;
epInfo[i].epAttribs = 0;
epInfo[i].bmNakPower = (i) ? USB_NAK_NOWAIT : USB_NAK_MAX_POWER;
}
if (pUsb) // register in USB subsystem
pUsb->RegisterDeviceClass(this); //set devConfig[] entry
}
uint8_t PS3BT::Init(uint8_t parent, uint8_t port, bool lowspeed) uint8_t PS3BT::Init(uint8_t parent, uint8_t port, bool lowspeed)
{ {
uint8_t buf[sizeof(USB_DEVICE_DESCRIPTOR)]; uint8_t buf[sizeof(USB_DEVICE_DESCRIPTOR)];

View file

@ -317,8 +317,7 @@ enum Rumble
class PS3BT : public USBDeviceConfig, public UsbConfigXtracter class PS3BT : public USBDeviceConfig, public UsbConfigXtracter
{ {
public: public:
PS3BT(USB *pUsb, uint8_t btadr5, uint8_t btadr4, uint8_t btadr3, uint8_t btadr2, uint8_t btadr1, uint8_t btadr0); PS3BT(USB *pUsb, uint8_t btadr5=0, uint8_t btadr4=0, uint8_t btadr3=0, uint8_t btadr2=0, uint8_t btadr1=0, uint8_t btadr0=0);
PS3BT(USB *pUsb);
// USBDeviceConfig implementation // USBDeviceConfig implementation
virtual uint8_t Init(uint8_t parent, uint8_t port, bool lowspeed); virtual uint8_t Init(uint8_t parent, uint8_t port, bool lowspeed);