diff --git a/include/libopencm3/efm32/common/gpio_common.h b/include/libopencm3/efm32/common/gpio_common.h
index d8bce510..5099b997 100644
--- a/include/libopencm3/efm32/common/gpio_common.h
+++ b/include/libopencm3/efm32/common/gpio_common.h
@@ -1,3 +1,5 @@
+/** @addtogroup gpio_defines
+ */
/*
* This file is part of the libopencm3 project.
*
@@ -17,12 +19,13 @@
* along with this library. If not, see .
*/
-#ifndef LIBOPENCM3_EFM32_GPIO_H
-#define LIBOPENCM3_EFM32_GPIO_H
+#pragma once
#include
#include
+/**@{*/
+
#define GPIO_P(i) (GPIO_BASE + (0x24 * (i)))
#define GPIO_PA GPIO_P(0)
#define GPIO_PB GPIO_P(1)
@@ -326,5 +329,4 @@ void gpio_port_config_lock(uint32_t gpio_port, uint16_t gpios);
END_DECLS
-#endif
-
+/**@}*/
\ No newline at end of file
diff --git a/include/libopencm3/efm32/common/gpio_common_hglg.h b/include/libopencm3/efm32/common/gpio_common_hglg.h
index 7e141117..55744902 100644
--- a/include/libopencm3/efm32/common/gpio_common_hglg.h
+++ b/include/libopencm3/efm32/common/gpio_common_hglg.h
@@ -1,3 +1,5 @@
+/** @addtogroup gpio_defines
+ */
/*
* This file is part of the libopencm3 project.
*
@@ -17,15 +19,13 @@
* along with this library. If not, see .
*/
-/** @cond */
-#if defined(LIBOPENCM3_GPIO_H)
-/** @endcond */
-#ifndef LIBOPENCM3_EFM32_GPIO_COMMON_HGLG_H
-#define LIBOPENCM3_EFM32_GPIO_COMMON_HGLG_H
+#pragma once
#include
#include
+/**@{*/
+
#define GPIO_P(i) (GPIO_BASE + (0x24 * (i)))
#define GPIO_PA GPIO_P(0)
#define GPIO_PB GPIO_P(1)
@@ -329,9 +329,4 @@ void gpio_port_config_lock(uint32_t gpio_port, uint16_t gpios);
END_DECLS
-#endif
-/** @cond */
-#else
-#warning "gpio_common_hglg.h should not be included explicitly, only via gpio.h"
-#endif
-/** @endcond */
+/**@}*/
\ No newline at end of file
diff --git a/include/libopencm3/efm32/ezr32wg/gpio.h b/include/libopencm3/efm32/ezr32wg/gpio.h
index 21cc6630..8332c851 100644
--- a/include/libopencm3/efm32/ezr32wg/gpio.h
+++ b/include/libopencm3/efm32/ezr32wg/gpio.h
@@ -1,3 +1,11 @@
+/** @defgroup gpio_defines GPIO Defines
+ *
+ * @brief Defined Constants and Types for the EZR32WG GPIO 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_GPIO_H
-#define LIBOPENCM3_EFM32_EZR32WG_GPIO_H
+#pragma once
#include
-
-#endif
diff --git a/include/libopencm3/efm32/hg/gpio.h b/include/libopencm3/efm32/hg/gpio.h
index 5218af66..5be1565e 100644
--- a/include/libopencm3/efm32/hg/gpio.h
+++ b/include/libopencm3/efm32/hg/gpio.h
@@ -1,3 +1,11 @@
+/** @defgroup gpio_defines GPIO Defines
+ *
+ * @brief Defined Constants and Types for the EFM32HG GPIO module
+ *
+ * @ingroup EFM32HG_defines
+ *
+ * LGPL License Terms @ref lgpl_license
+ */
/*
* This file is part of the libopencm3 project.
*
@@ -15,9 +23,6 @@
* along with this library. If not, see .
*/
-#ifndef LIBOPENCM3_GPIO_H
-#define LIBOPENCM3_GPIO_H
+#pragma once
#include
-
-#endif
diff --git a/include/libopencm3/efm32/lg/gpio.h b/include/libopencm3/efm32/lg/gpio.h
index 71bd54f6..f0684bac 100644
--- a/include/libopencm3/efm32/lg/gpio.h
+++ b/include/libopencm3/efm32/lg/gpio.h
@@ -1,3 +1,11 @@
+/** @defgroup gpio_defines GPIO Defines
+ *
+ * @brief Defined Constants and Types for the EFM32LG GPIO module
+ *
+ * @ingroup EFM32LG_defines
+ *
+ * LGPL License Terms @ref lgpl_license
+ */
/*
* This file is part of the libopencm3 project.
*
@@ -15,9 +23,6 @@
* along with this library. If not, see .
*/
-#ifndef LIBOPENCM3_GPIO_H
-#define LIBOPENCM3_GPIO_H
+#pragma once
#include
-
-#endif
diff --git a/include/libopencm3/efm32/wg/gpio.h b/include/libopencm3/efm32/wg/gpio.h
index 6bd8eb9b..7dafd830 100644
--- a/include/libopencm3/efm32/wg/gpio.h
+++ b/include/libopencm3/efm32/wg/gpio.h
@@ -1,3 +1,11 @@
+/** @defgroup gpio_defines GPIO Defines
+ *
+ * @brief Defined Constants and Types for the EFM32WG GPIO 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_GPIO_H
-#define LIBOPENCM3_EFM32_WG_GPIO_H
+#pragma once
#include
-
-#endif
diff --git a/lib/efm32/common/gpio_common.c b/lib/efm32/common/gpio_common.c
index 23574228..0c768ca4 100644
--- a/lib/efm32/common/gpio_common.c
+++ b/lib/efm32/common/gpio_common.c
@@ -1,3 +1,6 @@
+/** @addtogroup gpio_file GPIO peripheral API
+ * @ingroup peripheral_apis
+ */
/*
* This file is part of the libopencm3 project.
*
@@ -19,6 +22,8 @@
#include
+/**@{*/
+
/**
* Enable GPIO registers lock.
* @see gpio_disable_lock()
@@ -173,3 +178,5 @@ void gpio_port_config_lock(uint32_t gpio_port, uint16_t gpios)
{
GPIO_P_PINLOCKN(gpio_port) = ~gpios;
}
+
+/**@}*/
\ No newline at end of file