https://developer.mbed.org/teams/MaximIntegrated/code/USBDevice/#17ac7abb27a7