summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233/usb-imx233.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx233/usb-imx233.c')
-rw-r--r--firmware/target/arm/imx233/usb-imx233.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/firmware/target/arm/imx233/usb-imx233.c b/firmware/target/arm/imx233/usb-imx233.c
index 91fb770190..8aaa90c46b 100644
--- a/firmware/target/arm/imx233/usb-imx233.c
+++ b/firmware/target/arm/imx233/usb-imx233.c
@@ -68,12 +68,7 @@ void usb_init_device(void)
68 68
69int usb_detect(void) 69int usb_detect(void)
70{ 70{
71 return usb_plugged() ? USB_INSERTED : USB_EXTRACTED; 71 return (HW_POWER_STS & HW_POWER_STS__VBUSVALID) ? USB_INSERTED : USB_EXTRACTED;
72}
73
74bool usb_plugged(void)
75{
76 return !!(HW_POWER_STS & HW_POWER_STS__VBUSVALID);
77} 72}
78 73
79void usb_enable(bool on) 74void usb_enable(bool on)