aboutsummaryrefslogtreecommitdiff
path: root/include/libopenstm32
diff options
context:
space:
mode:
authorUwe Hermann2010-10-18 00:36:39 +0200
committerUwe Hermann2010-10-18 00:36:39 +0200
commit68b7e255ad8d0bf5529855773b7acdb9ff83835c (patch)
tree09d4f453f8afcf4e6c1603849a9825517025542b /include/libopenstm32
parent0287fd9029a3af7913a5330f1b4654552ebd75dd (diff)
Add timer handling functions.
Thanks to Edward Cheeseman <cheesemanedward@gmail.com>.
Diffstat (limited to 'include/libopenstm32')
-rw-r--r--include/libopenstm32/timer.h3
1 files changed, 3 insertions, 0 deletions
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)