diff --git a/include/libopencm3/efm32/common/usb_common.h b/include/libopencm3/efm32/common/usb_common.h
index 891edbfb..e4e8e16f 100644
--- a/include/libopencm3/efm32/common/usb_common.h
+++ b/include/libopencm3/efm32/common/usb_common.h
@@ -1,3 +1,5 @@
+/** @addtogroup usb_defines
+ */
/*
* This file is part of the libopencm3 project.
*
@@ -17,12 +19,13 @@
* along with this library. If not, see .
*/
-#ifndef LIBOPENCM3_EFM32_USB_H
-#define LIBOPENCM3_EFM32_USB_H
+#pragma once
#include
#include
+/**@{*/
+
#define USB_CTRL MMIO32(USB_BASE + 0x000)
#define USB_STATUS MMIO32(USB_BASE + 0x004)
#define USB_IF MMIO32(USB_BASE + 0x008)
@@ -365,5 +368,4 @@
/* Bits 18:7 - Reserved */
#define USB_DIEP0TSIZ_XFRSIZ_MASK (0x7f << 0)
-#endif
-
+/**@}*/
\ No newline at end of file
diff --git a/include/libopencm3/efm32/ezr32wg/usb.h b/include/libopencm3/efm32/ezr32wg/usb.h
index 87be3234..2d980899 100644
--- a/include/libopencm3/efm32/ezr32wg/usb.h
+++ b/include/libopencm3/efm32/ezr32wg/usb.h
@@ -1,3 +1,11 @@
+/** @defgroup usb_defines USB Defines
+ *
+ * @brief Defined Constants and Types for the USB module
+ *
+ * @ingroup EZR32WG_defines
+ *
+ * LGPL License Terms @ref lgpl_license
+ */
/*
* This file is part of the libopencm3 project.
*
@@ -17,9 +25,6 @@
* along with this library. If not, see .
*/
-#ifndef LIBOPENCM3_EFM32_EZR32WG_USB_H
-#define LIBOPENCM3_EFM32_EZR32WG_USB_H
+#pragma once
#include
-
-#endif
diff --git a/include/libopencm3/efm32/hg/usb.h b/include/libopencm3/efm32/hg/usb.h
index f4096c27..b3b45baa 100644
--- a/include/libopencm3/efm32/hg/usb.h
+++ b/include/libopencm3/efm32/hg/usb.h
@@ -1,3 +1,11 @@
+/** @defgroup usb_defines USB Defines
+ *
+ * @brief Defined Constants and Types for the USB module
+ *
+ * @ingroup EFM32HG_defines
+ *
+ * LGPL License Terms @ref lgpl_license
+ */
/*
* This file is part of the libopencm3 project.
*
@@ -18,12 +26,13 @@
* along with this library. If not, see .
*/
-#ifndef LIBOPENCM3_EFM32_USB_H
-#define LIBOPENCM3_EFM32_USB_H
+#pragma once
#include
#include
+/**@{*/
+
#define USB_CTRL MMIO32(USB_BASE + 0x000)
#define USB_STATUS MMIO32(USB_BASE + 0x004)
#define USB_IF MMIO32(USB_BASE + 0x008)
@@ -58,4 +67,4 @@
/* Bit 1 - Reserved */
#define USB_ROUTE_PHYPEN (1 << 0)
-#endif
+/**@}*/
\ No newline at end of file
diff --git a/include/libopencm3/efm32/lg/usb.h b/include/libopencm3/efm32/lg/usb.h
index 1bb0a7b8..8c781b19 100644
--- a/include/libopencm3/efm32/lg/usb.h
+++ b/include/libopencm3/efm32/lg/usb.h
@@ -1,3 +1,11 @@
+/** @defgroup usb_defines USB Defines
+ *
+ * @brief Defined Constants and Types for the USB module
+ *
+ * @ingroup EFM32LG_defines
+ *
+ * LGPL License Terms @ref lgpl_license
+ */
/*
* This file is part of the libopencm3 project.
*
@@ -17,9 +25,6 @@
* along with this library. If not, see .
*/
-#ifndef LIBOPENCM3_EFM32_LG_USB_H
-#define LIBOPENCM3_EFM32_LG_USB_H
+#pragma once
#include
-
-#endif
diff --git a/include/libopencm3/efm32/wg/usb.h b/include/libopencm3/efm32/wg/usb.h
index 49edde04..cc066731 100644
--- a/include/libopencm3/efm32/wg/usb.h
+++ b/include/libopencm3/efm32/wg/usb.h
@@ -1,3 +1,11 @@
+/** @defgroup usb_defines USB Defines
+ *
+ * @brief Defined Constants and Types for the USB module
+ *
+ * @ingroup EFM32WG_defines
+ *
+ * LGPL License Terms @ref lgpl_license
+ */
/*
* This file is part of the libopencm3 project.
*
@@ -17,9 +25,6 @@
* along with this library. If not, see .
*/
-#ifndef LIBOPENCM3_EFM32_WG_USB_H
-#define LIBOPENCM3_EFM32_WG_USB_H
+#pragma once
#include
-
-#endif
diff --git a/lib/usb/usb_efm32.c b/lib/usb/usb_efm32.c
index 5768947c..4f7fa254 100644
--- a/lib/usb/usb_efm32.c
+++ b/lib/usb/usb_efm32.c
@@ -1,3 +1,9 @@
+/** @addtogroup usb_file USB peripheral API
+ * @ingroup peripheral_apis
+ *
+ * @sa usb_defines
+ * @copyright See @ref lgpl_license
+ */
/*
* This file is part of the libopencm3 project.
*
@@ -26,6 +32,8 @@
#include
#include "usb_private.h"
+/**@{*/
+
/* Receive FIFO size in 32-bit words. */
#define RX_FIFO_SIZE 256
@@ -424,3 +432,5 @@ const struct _usbd_driver efm32lg_usb_driver = {
.set_address_before_status = 1,
.rx_fifo_size = RX_FIFO_SIZE,
};
+
+/**@}*/
\ No newline at end of file
diff --git a/lib/usb/usb_efm32hg.c b/lib/usb/usb_efm32hg.c
index 96f22c1e..5459566e 100644
--- a/lib/usb/usb_efm32hg.c
+++ b/lib/usb/usb_efm32hg.c
@@ -1,3 +1,13 @@
+/** @addtogroup usb_file USB peripheral API
+ * @ingroup peripheral_apis
+ *
+ * @brief USB Peripheral for Happy Gecko
+ *
+ * The Happy Gecko uses the "standard" usb_dwc_otg core.
+ *
+ * @sa usb_defines
+ * @copyright See @ref lgpl_license
+ */
/*
* This file is part of the libopencm3 project.
*
@@ -28,6 +38,8 @@
#include "usb_private.h"
#include "usb_dwc_common.h"
+/**@{*/
+
/* Receive FIFO size in 32-bit words. */
#define RX_FIFO_SIZE 256
@@ -124,3 +136,5 @@ const struct _usbd_driver efm32hg_usb_driver = {
.set_address_before_status = 1,
.rx_fifo_size = RX_FIFO_SIZE,
};
+
+/**@}*/
\ No newline at end of file