diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2011-02-27 14:04:29 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2011-02-27 14:04:29 +0000 |
commit | f3f481183aa201739a84f847769dcba50166eb98 (patch) | |
tree | 1457d92965426e6aa46957e3044e26d29124c56e /LUFA/Drivers/USB/Core/UC3B/USBController_UC3B.h | |
parent | cf2411435cf41ca4dbfcc3d89c6287743db79625 (diff) | |
download | lufa-f3f481183aa201739a84f847769dcba50166eb98.tar.gz lufa-f3f481183aa201739a84f847769dcba50166eb98.tar.bz2 lufa-f3f481183aa201739a84f847769dcba50166eb98.zip |
More AVR32 UC3B architecture ports - USB device mode applications can now be sucessfully compiled, although they will be currently non-functional.
Diffstat (limited to 'LUFA/Drivers/USB/Core/UC3B/USBController_UC3B.h')
-rw-r--r-- | LUFA/Drivers/USB/Core/UC3B/USBController_UC3B.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/LUFA/Drivers/USB/Core/UC3B/USBController_UC3B.h b/LUFA/Drivers/USB/Core/UC3B/USBController_UC3B.h index f528c6b1c..7eb69cd4d 100644 --- a/LUFA/Drivers/USB/Core/UC3B/USBController_UC3B.h +++ b/LUFA/Drivers/USB/Core/UC3B/USBController_UC3B.h @@ -121,6 +121,18 @@ #endif
/* Inline Functions: */
+ /** Determines if the VBUS line is currently high (i.e. the USB host is supplying power).
+ *
+ * \note This function is not available on some AVR models which do not support hardware VBUS monitoring.
+ *
+ * \return Boolean \c true if the VBUS line is currently detecting power from a host, \c false otherwise.
+ */
+ static inline bool USB_VBUS_GetStatus(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
+ static inline bool USB_VBUS_GetStatus(void)
+ {
+ return AVR32_USBB.USBSTA.vbus;
+ }
+
/** Detaches the device from the USB bus. This has the effect of removing the device from any
* attached host, ceasing USB communications. If no host is present, this prevents any host from
* enumerating the device once attached until \ref USB_Attach() is called.
@@ -278,7 +290,6 @@ #endif
/* Inline Functions: */
- #if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)
static inline void USB_OTGPAD_On(void) ATTR_ALWAYS_INLINE;
static inline void USB_OTGPAD_On(void)
{
@@ -290,7 +301,6 @@ {
AVR32_USBB.USBCON.otgpade = false;
}
- #endif
static inline void USB_CLK_Freeze(void) ATTR_ALWAYS_INLINE;
static inline void USB_CLK_Freeze(void)
|