aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-05-20 15:10:37 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2011-05-20 15:10:37 -0400
commit19d526ec111f6e5da3401ffb40bcd5d915992494 (patch)
tree36822e334032d08d00171f7096cc3b7969b7e16e
parent9f3dad4fbb084671bd49887c5cb07194d9141381 (diff)
downloadlibrambutan-19d526ec111f6e5da3401ffb40bcd5d915992494.tar.gz
librambutan-19d526ec111f6e5da3401ffb40bcd5d915992494.zip
timer.h: Doxygen
-rw-r--r--libmaple/timer.h33
1 files changed, 23 insertions, 10 deletions
diff --git a/libmaple/timer.h b/libmaple/timer.h
index eef7060..f142908 100644
--- a/libmaple/timer.h
+++ b/libmaple/timer.h
@@ -135,24 +135,37 @@ typedef struct timer_bas_reg_map {
* Timer devices
*/
+/**
+ * @brief Timer register map type.
+ *
+ * Just holds a pointer to the correct type of register map, based on
+ * the timer's type.
+ */
typedef union timer_reg_map {
- timer_adv_reg_map *adv;
- timer_gen_reg_map *gen;
- timer_bas_reg_map *bas;
+ timer_adv_reg_map *adv; /**< Advanced register map */
+ timer_gen_reg_map *gen; /**< General purpose register map */
+ timer_bas_reg_map *bas; /**< Basic register map */
} timer_reg_map;
+/**
+ * @brief Timer type
+ *
+ * Type marker for timer_dev.
+ *
+ * @see timer_dev
+ */
typedef enum timer_type {
- TIMER_ADVANCED,
- TIMER_GENERAL,
- TIMER_BASIC
+ TIMER_ADVANCED, /**< Advanced type */
+ TIMER_GENERAL, /**< General purpose type */
+ TIMER_BASIC /**< Basic type */
} timer_type;
/** Timer device type */
typedef struct timer_dev {
- timer_reg_map regs;
- rcc_clk_id clk_id;
- timer_type type;
- voidFuncPtr handlers[];
+ timer_reg_map regs; /**< Register map */
+ rcc_clk_id clk_id; /**< RCC clock information */
+ timer_type type; /**< Timer's type */
+ voidFuncPtr handlers[]; /**< User IRQ handlers */
} timer_dev;
extern timer_dev *TIMER1;