That is not correct place because that was affected by bare metal profil.
But here is full list of all APIs, where is info also about state of all APIs under Bare metal profile. There seems be wrong info about USB APIs, probably missing “(can be manually enabled)”.
Then you need to find mbed_lib.json of USB API in its folder.
The events was added because compiler throw error about “Events missing in USB” (something similar).
Ah yeah I did visit that list of APIs, saw that USB was enabled on bare metal, and then figured it must be a bug. If it had said “can be manually enabled (here’s how)” I think it’s likely I’d have found the solution.
Still I don’t get why you think the API documentation isn’t a reasonable place to put a note like “Note: this API is not enabled for all profiles, see (here) for details.”
In fact even better would be
#ifndef USB_API_ENABLED #error “You need to do this…” #endif