USBHost: Don't pass NULL in for uint32_t parameters.

USBHostHub.cpp made a few calls to the USBHALHost::deviceDisconnected()
virtual method passing in NULL for the addr parameter which is actually
declared as uint32_t and not a pointer type.  Switching these calls
to pass in a 0 for this parameter silences GCC warnings about
incompatible types.
pull/67/head
Adam Green 2013-08-29 21:12:12 -07:00
parent 8281836df3
commit fb769b1566
1 changed files with 3 additions and 3 deletions

View File

@ -192,7 +192,7 @@ void USBHostHub::rxHandler() {
host->deviceConnected(dev->getHub() + 1, port, status & PORT_LOW_SPEED, this);
} else {
USB_DBG("[hub handler hub: %d - port: %d] device disconnected", dev->getHub(), port);
host->deviceDisconnected(dev->getHub() + 1, port, this, NULL);
host->deviceDisconnected(dev->getHub() + 1, port, this, 0);
}
clearPortFeature(C_PORT_CONNECTION_FEATURE, port);
@ -209,7 +209,7 @@ void USBHostHub::rxHandler() {
if ((status & PORT_OVER_CURRENT)) {
USB_ERR("OVER CURRENT DETECTED\r\n");
clearPortFeature(PORT_OVER_CURRENT, port);
host->deviceDisconnected(dev->getHub() + 1, port, this, NULL);
host->deviceDisconnected(dev->getHub() + 1, port, this, 0);
}
}
}
@ -229,7 +229,7 @@ void USBHostHub::portReset(uint8_t port) {
if (status & PORT_OVER_CURRENT) {
USB_ERR("OVER CURRENT DETECTED\r\n");
clearPortFeature(PORT_OVER_CURRENT, port);
host->deviceDisconnected(dev->getHub() + 1, port, this, NULL);
host->deviceDisconnected(dev->getHub() + 1, port, this, 0);
break;
}
Thread::wait(10);