How to Detect in Firmware if the Device has Enumerated as a High Speed or Full Speed Device

Version 1
    Question: How can it be detected in firmware whether a device has enumerated as a full speed device or a high speed device?



    The register USBCS in FX2LP contains a bit HSM(USBC.7) which is set high when enumeration happens in high speed. Also, the 0-1 transition of this bit will cause an HSGRANT interrupt request.