summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2005-07-12 12:16:17 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2005-07-12 12:16:17 +0000
commitb3437ecbfefcc819dc3fb859f2c1e1894dd6cca1 (patch)
treeee052d47255c97a62ba29f1dedb85b3de208d840
parent25bb98d66a5df7475113e6a254568d1c2423f183 (diff)
downloadrockbox-b3437ecbfefcc819dc3fb859f2c1e1894dd6cca1.tar.gz
rockbox-b3437ecbfefcc819dc3fb859f2c1e1894dd6cca1.zip
More atomic GPIO
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7123 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/drivers/adc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/drivers/adc.c b/firmware/drivers/adc.c
index 1292548e88..3dafb0a916 100644
--- a/firmware/drivers/adc.c
+++ b/firmware/drivers/adc.c
@@ -110,8 +110,8 @@ void adc_init(void)
static unsigned char adcdata[NUM_ADC_CHANNELS];
-#define CS_LO GPIO_OUT &= ~0x80
-#define CS_HI GPIO_OUT |= 0x80
+#define CS_LO and_l(~0x80, &GPIO_OUT)
+#define CS_HI or_l(0x80, &GPIO_OUT)
#define CLK_LO and_l(~0x00400000, &GPIO_OUT)
#define CLK_HI or_l(0x00400000, &GPIO_OUT)
#define DO (GPIO_READ & 0x80000000)