altos: Add P2SEL_*_MASK defines to cc1111.h
authorKeith Packard <keithp@keithp.com>
Fri, 1 Apr 2011 21:03:25 +0000 (14:03 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 1 Apr 2011 21:03:25 +0000 (14:03 -0700)
These are used to avoid having the code "know" which selections are 1
and which are 0 bits.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/cc1111.h

index effb1a68657820eed7991fc37c4377f1b4a13257..a72d7416ae7f16f8d81f233e05b8b8c5e8ef5c53 100644 (file)
@@ -565,14 +565,19 @@ sfr at 0xF5 P2SEL;
 #define P2SEL_PRI3P1_MASK              (1 << 6)
 #define P2SEL_PRI2P1_USART1            (0 << 5)
 #define P2SEL_PRI2P1_TIMER3            (1 << 5)
+#define P2SEL_PRI2P1_MASK              (1 << 5)
 #define P2SEL_PRI1P1_TIMER1            (0 << 4)
 #define P2SEL_PRI1P1_TIMER4            (1 << 4)
+#define P2SEL_PRI1P1_MASK              (1 << 4)
 #define P2SEL_PRI0P1_USART0            (0 << 3)
 #define P2SEL_PRI0P1_TIMER1            (1 << 3)
+#define P2SEL_PRI0P1_MASK              (1 << 3)
 #define P2SEL_SELP2_4_GPIO             (0 << 2)
 #define P2SEL_SELP2_4_PERIPHERAL       (1 << 2)
+#define P2SEL_SELP2_4_MASK             (1 << 2)
 #define P2SEL_SELP2_3_GPIO             (0 << 1)
 #define P2SEL_SELP2_3_PERIPHERAL       (1 << 1)
+#define P2SEL_SELP2_3_MASK             (1 << 1)
 #define P2SEL_SELP2_0_GPIO             (0 << 0)
 #define P2SEL_SELP2_0_PERIPHERAL       (1 << 0)
 #define P2SEL_SELP2_0_MASK             (1 << 0)