Added #ifdef several places

This commit is contained in:
Kristian Sloth Lauszus 2013-01-19 15:43:28 +01:00
parent 4e7c5ce51e
commit 6598bca58a
4 changed files with 7 additions and 1 deletions

View file

@ -282,6 +282,7 @@ void BTD::EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto
bNumEP++; bNumEP++;
} }
void BTD::PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR* ep_ptr) { void BTD::PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR* ep_ptr) {
#ifdef EXTRADEBUG
Notify(PSTR("\r\nEndpoint descriptor:")); Notify(PSTR("\r\nEndpoint descriptor:"));
Notify(PSTR("\r\nLength:\t\t")); Notify(PSTR("\r\nLength:\t\t"));
PrintHex<uint8_t>(ep_ptr->bLength); PrintHex<uint8_t>(ep_ptr->bLength);
@ -295,6 +296,7 @@ void BTD::PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR* ep_ptr) {
PrintHex<uint16_t>(ep_ptr->wMaxPacketSize); PrintHex<uint16_t>(ep_ptr->wMaxPacketSize);
Notify(PSTR("\r\nPoll Intrv:\t")); Notify(PSTR("\r\nPoll Intrv:\t"));
PrintHex<uint8_t>(ep_ptr->bInterval); PrintHex<uint8_t>(ep_ptr->bInterval);
#endif
} }
/* Performs a cleanup after failed Init() attempt */ /* Performs a cleanup after failed Init() attempt */

View file

@ -315,6 +315,7 @@ void PS3USB::readReport() {
} }
void PS3USB::printReport() { //Uncomment "#define PRINTREPORT" to print the report send by the PS3 Controllers void PS3USB::printReport() { //Uncomment "#define PRINTREPORT" to print the report send by the PS3 Controllers
#ifdef PRINTREPORT
if (readBuf == NULL) if (readBuf == NULL)
return; return;
for(uint8_t i = 0; i < PS3_REPORT_BUFFER_SIZE;i++) { for(uint8_t i = 0; i < PS3_REPORT_BUFFER_SIZE;i++) {
@ -322,6 +323,7 @@ void PS3USB::printReport() { //Uncomment "#define PRINTREPORT" to print the repo
Serial.print(" "); Serial.print(" ");
} }
Serial.println(); Serial.println();
#endif
} }
bool PS3USB::getButtonPress(Button b) { bool PS3USB::getButtonPress(Button b) {

View file

@ -363,7 +363,7 @@ void XBOXRECV::readReport(uint8_t controller) {
} }
void XBOXRECV::printReport(uint8_t controller, uint8_t nBytes) { //Uncomment "#define PRINTREPORT" to print the report send by the Xbox 360 Controller void XBOXRECV::printReport(uint8_t controller, uint8_t nBytes) { //Uncomment "#define PRINTREPORT" to print the report send by the Xbox 360 Controller
#if defined(PRINTREPORT) #ifdef PRINTREPORT
if (readBuf == NULL) if (readBuf == NULL)
return; return;
Notify(PSTR("Controller ")); Notify(PSTR("Controller "));

View file

@ -269,6 +269,7 @@ void XBOXUSB::readReport() {
} }
void XBOXUSB::printReport() { //Uncomment "#define PRINTREPORT" to print the report send by the Xbox 360 Controller void XBOXUSB::printReport() { //Uncomment "#define PRINTREPORT" to print the report send by the Xbox 360 Controller
#ifdef PRINTREPORT
if (readBuf == NULL) if (readBuf == NULL)
return; return;
for(uint8_t i = 0; i < XBOX_REPORT_BUFFER_SIZE;i++) { for(uint8_t i = 0; i < XBOX_REPORT_BUFFER_SIZE;i++) {
@ -276,6 +277,7 @@ void XBOXUSB::printReport() { //Uncomment "#define PRINTREPORT" to print the rep
Serial.print(" "); Serial.print(" ");
} }
Serial.println(""); Serial.println("");
#endif
} }
uint8_t XBOXUSB::getButton(Button b) { uint8_t XBOXUSB::getButton(Button b) {