able to response with good crc

This commit is contained in:
hathach
2023-06-07 18:57:48 +07:00
parent b893f1d541
commit 9b7dee563e
9 changed files with 257 additions and 75 deletions

View File

@@ -252,9 +252,19 @@ static inline usbd_class_driver_t const * get_driver(uint8_t drvid)
drvid -= _app_driver_count;
}
// when there is no built-in drivers BUILTIN_DRIVER_COUNT = 0 will cause -Wtype-limits warning
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wtype-limits"
#endif
// Built-in drivers
if (drvid < BUILTIN_DRIVER_COUNT) return &_usbd_driver[drvid];
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
return NULL;
}