From 68b7e255ad8d0bf5529855773b7acdb9ff83835c Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Mon, 18 Oct 2010 00:36:39 +0200 Subject: Add timer handling functions. Thanks to Edward Cheeseman . --- include/libopenstm32/timer.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/libopenstm32') diff --git a/include/libopenstm32/timer.h b/include/libopenstm32/timer.h index 20392e3..5196cbb 100644 --- a/include/libopenstm32/timer.h +++ b/include/libopenstm32/timer.h @@ -231,6 +231,7 @@ #define TIM_CR1_CKD_CK_INT (0x0 << 8) #define TIM_CR1_CKD_CK_INT_MUL_2 (0x1 << 8) #define TIM_CR1_CKD_CK_INT_MUL_4 (0x2 << 8) +#define TIM_CR1_CKD_CK_INT_MASK (0x3 << 8) /* ARPE: Auto-reload preload enable */ #define TIM_CR1_ARPE (1 << 7) @@ -279,6 +280,7 @@ /* OIS1: Output idle state 1 (OC1 output) */ #define TIM_CR2_OIS1 (1 << 8) +#define TIM_CR2_OIS_MASK (0x7f << 8) /* TI1S: TI1 selection */ #define TIM_CR2_TI1S (1 << 7) @@ -292,6 +294,7 @@ #define TIM_CR2_MMS_COMPARE_OC2REF (0x5 << 4) #define TIM_CR2_MMS_COMPARE_OC3REF (0x6 << 4) #define TIM_CR2_MMS_COMPARE_OC4REF (0x7 << 4) +#define TIM_CR2_MMS_MASK (0x7 << 4) /* CCDS: Capture/compare DMA selection */ #define TIM_CR2_CCDS (1 << 3) -- cgit v1.2.3