mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Added #ifdef several places
This commit is contained in:
parent
4e7c5ce51e
commit
6598bca58a
4 changed files with 7 additions and 1 deletions
2
BTD.cpp
2
BTD.cpp
|
@ -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 */
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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 "));
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue