aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-08-30 01:11:33 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2011-08-30 01:11:33 -0400
commitf677d552b0ffee4153997372e8e39fb5fc1d53d2 (patch)
tree797521e23cba0f0a258d3a51ec6ef71228e20dba
parent2c37f61946305f77d162b61ecbedd614624a6bf3 (diff)
downloadlibrambutan-f677d552b0ffee4153997372e8e39fb5fc1d53d2.tar.gz
librambutan-f677d552b0ffee4153997372e8e39fb5fc1d53d2.zip
stm32.h: Doxygen tweaks.
For some unfathomable reason, Doxygen happily believes in PCLK2, but but not PCLK1, so Breathe can't find the docs for PCLK1, and all the children are unhappy. As a workaround, move all the Doxgyen crap into __DOXYGEN_PREDEFINED_HACK sections immediately preceding the actual definitions.
-rw-r--r--libmaple/stm32.h98
1 files changed, 49 insertions, 49 deletions
diff --git a/libmaple/stm32.h b/libmaple/stm32.h
index 0d19ddb..6996154 100644
--- a/libmaple/stm32.h
+++ b/libmaple/stm32.h
@@ -40,15 +40,21 @@
* usage, you should try to keep their number to an absolute minimum.
*/
-/**
- * \def PCLK1
- * Clock speed of APB1 peripherals, in Hz.
- */
+#ifdef __DOXYGEN_PREDEFINED_HACK
-/**
- * \def PCLK2
- * Clock speed of APB2 peripherals, in Hz.
- */
+ /**
+ * \def PCLK1
+ * Clock speed of APB1 peripherals, in Hz.
+ */
+ #define PCLK1
+
+ /**
+ * \def PCLK2
+ * Clock speed of APB2 peripherals, in Hz.
+ */
+ #define PCLK2
+
+#endif
#ifndef PCLK1
#define PCLK1 36000000U
@@ -61,14 +67,19 @@
* Density-specific configuration.
*/
-/**
- * \def NR_INTERRUPTS
- *
- * Number of interrupts in the NVIC. This define is automatically
- * generated whenever the proper density is defined (currently, this
- * is restricted to defining one of STM32_MEDIUM_DENSITY and
- * STM32_HIGH_DENSITY).
- */
+#ifdef __DOXYGEN_PREDEFINED_HACK
+
+ /**
+ * \def NR_INTERRUPTS
+ *
+ * Number of interrupts in the NVIC. This define is automatically
+ * generated whenever the proper density is defined (currently, this
+ * is restricted to defining one of STM32_MEDIUM_DENSITY and
+ * STM32_HIGH_DENSITY).
+ */
+ #define NR_INTERRUPTS
+
+#endif
#ifdef STM32_MEDIUM_DENSITY
#define NR_INTERRUPTS 43
@@ -82,11 +93,28 @@
/*
* MCU-specific configuration.
- *
- * If you add something here, make sure to include documentation for
- * it in the __DOXYGEN_PREDEFINED_HACK section, below.
*/
+#ifdef __DOXYGEN_PREDEFINED_HACK
+
+ /**
+ * Number of GPIO ports
+ */
+ #define NR_GPIO_PORTS
+
+ /* SRAM_SIZE intentionally not documented as I'm not convinced
+ * it's a good idea [mbolivar]. */
+
+ /**
+ * @brief Multiplier to convert microseconds into loop iterations
+ * in delay_us().
+ *
+ * @see delay_us()
+ */
+ #define DELAY_US_MULT
+
+#endif
+
#if defined(MCU_STM32F103RB)
/* e.g., LeafLabs Maple */
@@ -105,8 +133,8 @@
/* e.g., LeafLabs Maple Mini */
/* Note that this is not, strictly speaking, true. But only pins
- 0 and 1 exist, and they're used for OSC on the Mini, so we'll
- live with this for now. */
+ * 0 and 1 exist, and they're used for OSC on the Mini, so we'll
+ * live with this for now. */
#define NR_GPIO_PORTS 3
#define SRAM_SIZE 0x5000
@@ -126,32 +154,4 @@
#endif
-/* MCU-specific config documentation.
- *
- * Doxygen refuses to trust us when we \def something that it doesn't
- * notice as a #define. To work around this, we put
- * __DOXYGEN_PREDEFINED_HACK into our Doxyfile's PREDEFINED, so that
- * this section is considered part of the code by doxygen, but not by
- * an actual compile. */
-
-#ifdef __DOXYGEN_PREDEFINED_HACK
-
- /**
- * Number of GPIO ports
- */
- #define NR_GPIO_PORTS
-
- /* SRAM_SIZE intentionally not documented as I'm not convinced
- * it's a good idea [mbolivar]. */
-
- /**
- * @brief Multiplier to convert microseconds into loop iterations
- * in delay_us().
- *
- * @see delay_us()
- */
- #define DELAY_US_MULT
-
-#endif /* __DOXYGEN_PREDEFINED_HACK */
-
#endif /* _STM32_H_ */