diff options
| author | onelife.real <[email protected]> | 2011-02-17 03:33:15 +0000 |
|---|---|---|
| committer | onelife.real <[email protected]> | 2011-02-17 03:33:15 +0000 |
| commit | 314bcbd3ea8a79623cf199f665b0631ef3fc530b (patch) | |
| tree | 516ba8ac07c43c61f928d281b36d6e93f50334e1 /bsp/efm32/drv_timer.h | |
| parent | d128ba91691534b3e64b6736d4dfbfbe81244055 (diff) | |
*** EFM32 branch ***
- New branch for Energy Micro's MCUs (http://energymicro.com/).
- Target board: FM32 Gecko Starter Kit (http://www.energymicro.com/tools)
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1274 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'bsp/efm32/drv_timer.h')
| -rw-r--r-- | bsp/efm32/drv_timer.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/bsp/efm32/drv_timer.h b/bsp/efm32/drv_timer.h new file mode 100644 index 0000000000..aacb8ce266 --- /dev/null +++ b/bsp/efm32/drv_timer.h @@ -0,0 +1,42 @@ +/******************************************************************//**
+ * @file drv_timer.h
+ * @brief USART driver of RT-Thread RTOS for EFM32
+ * COPYRIGHT (C) 2009, RT-Thread Development Team
+ * @author onelife
+ * @version 0.4 beta
+ **********************************************************************
+ * @section License
+ * The license and distribution terms for this file may be found in the file LICENSE in this
+ * distribution or at http://www.rt-thread.org/license/LICENSE
+ **********************************************************************
+ * @section Change Logs
+ * Date Author Notes
+ * 2011-01-18 onelife Initial creation for EFM32
+ *********************************************************************/
+#ifndef __DRV_TIMER_H__
+#define __DRV_TIMER_H__
+
+/* Includes -------------------------------------------------------------------*/
+#include "hdl_interrupt.h"
+
+/* Exported types -------------------------------------------------------------*/
+struct efm32_timer_device_t
+{
+ TIMER_TypeDef* timer_device;
+ efm32_irq_hook_t hook;
+};
+
+struct efm32_timer_control_t
+{
+ rt_uint32_t period;
+ efm32_irq_hook_t hook;
+};
+
+/* Exported constants ---------------------------------------------------------*/
+/* Exported macro -------------------------------------------------------------*/
+#define TMR_CFG_PRESCALER timerPrescale1024
+
+/* Exported functions --------------------------------------------------------- */
+void rt_hw_timer_init(void);
+
+#endif /*__DRV_TIMER_H__ */
|
