From 19d526ec111f6e5da3401ffb40bcd5d915992494 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Fri, 20 May 2011 15:10:37 -0400 Subject: timer.h: Doxygen --- libmaple/timer.h | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) (limited to 'libmaple') 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; -- cgit v1.2.3