From 73427c03848c21cfd6651bc2148ebb26db4aaeb2 Mon Sep 17 00:00:00 2001 From: Kristian Lauszus Date: Thu, 24 May 2012 14:39:01 +0200 Subject: [PATCH] Combined constructors --- PS3BT.cpp | 19 ------------------- PS3BT.h | 5 ++--- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/PS3BT.cpp b/PS3BT.cpp index c80e58ab..827e2867 100644 --- a/PS3BT.cpp +++ b/PS3BT.cpp @@ -62,25 +62,6 @@ bPollEnable(false) // don't start polling before dongle is connected 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; iRegisterDeviceClass(this); //set devConfig[] entry -} - uint8_t PS3BT::Init(uint8_t parent, uint8_t port, bool lowspeed) { uint8_t buf[sizeof(USB_DEVICE_DESCRIPTOR)]; diff --git a/PS3BT.h b/PS3BT.h index b2983b7c..3f326454 100644 --- a/PS3BT.h +++ b/PS3BT.h @@ -316,9 +316,8 @@ enum Rumble class PS3BT : public USBDeviceConfig, public UsbConfigXtracter { -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); +public: + 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); // USBDeviceConfig implementation virtual uint8_t Init(uint8_t parent, uint8_t port, bool lowspeed);