diff options
| author | Ha Thach <[email protected]> | 2022-07-12 11:08:19 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-07-12 11:08:19 +0700 |
| commit | 1a8c3a863bb1d172364ffe80029620fa75efc7a4 (patch) | |
| tree | f86f35ea7d4d1ab3e6d9648edfa35a39456bf7c8 /src/host | |
| parent | 0bfb9d62de3a13b685437b503e2170550662bb96 (diff) | |
| parent | 4ea27acd1da9e0144dbfbf805b87b22d16f7db8c (diff) | |
Merge pull request #1552 from hathach/fix-old-gcc
Fix warnings when compiling rp2040 with older version of gcc
Diffstat (limited to 'src/host')
| -rw-r--r-- | src/host/usbh.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/host/usbh.c b/src/host/usbh.c index b6a03b82e..0415a26cb 100644 --- a/src/host/usbh.c +++ b/src/host/usbh.c @@ -123,7 +123,6 @@ typedef struct { // Invalid driver ID in itf2drv[] ep2drv[][] mapping enum { DRVID_INVALID = 0xFFu }; -enum { ADDR_INVALID = 0xFFu }; enum { CONTROLLER_INVALID = 0xFFu }; #if CFG_TUSB_DEBUG >= 2 @@ -1434,7 +1433,8 @@ static uint8_t get_new_address(bool is_hub) { if (!_usbh_devices[idx].connected) return (idx+1); } - return ADDR_INVALID; + + return 0; // invalid address } static bool enum_request_set_addr(void) @@ -1443,7 +1443,7 @@ static bool enum_request_set_addr(void) // Get new address uint8_t const new_addr = get_new_address(desc_device->bDeviceClass == TUSB_CLASS_HUB); - TU_ASSERT(new_addr != ADDR_INVALID); + TU_ASSERT(new_addr != 0); TU_LOG2("Set Address = %d\r\n", new_addr); |
