mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-21 14:50:44 +01:00
[ion] Handle USBEnumeration event like USBPlug.
Change-Id: I70c1dc92fdba8e56508a1dce65ad30a771326a30
This commit is contained in:
@@ -13,6 +13,13 @@ bool isPlugged() {
|
||||
return Device::VbusPin.group().IDR()->get(Device::VbusPin.pin());
|
||||
}
|
||||
|
||||
bool isEnumerated() {
|
||||
/* Note: This implementation is not perfect. One would assume isEnumerated to
|
||||
* return true for as long as the device is enumerated. But the GINTSTS
|
||||
* register will be cleared in the poll() routine. */
|
||||
return OTG.GINTSTS()->getENUMDNE();
|
||||
}
|
||||
|
||||
void removeSoftDisconnect() {
|
||||
OTG.DCTL()->setSDIS(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user