From 831707d99191cfd7ed7d72725821bc2d9844baed Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Tue, 22 Jun 2010 04:00:34 +0000 Subject: lv24020lp tuner: On PP targets (c200/e200), use the atomic GPIO bitwise macros for the interface since it shares GPIOH with the clickwheel interrupt. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27038 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/sandisk/power-c200_e200.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'firmware/target') diff --git a/firmware/target/arm/sandisk/power-c200_e200.c b/firmware/target/arm/sandisk/power-c200_e200.c index cc9d16f466..6637111ec8 100644 --- a/firmware/target/arm/sandisk/power-c200_e200.c +++ b/firmware/target/arm/sandisk/power-c200_e200.c @@ -107,18 +107,18 @@ bool tuner_power(bool status) in host read mode: */ /* 1. Set direction of the DATA-line to input-mode. */ - GPIOH_OUTPUT_EN &= ~(1 << 5); - GPIOH_ENABLE |= (1 << 5); + GPIO_CLEAR_BITWISE(GPIOH_OUTPUT_EN, 1 << 5); + GPIO_SET_BITWISE(GPIOH_ENABLE, 1 << 5); /* 2. Drive NR_W low */ - GPIOH_OUTPUT_VAL &= ~(1 << 3); - GPIOH_OUTPUT_EN |= (1 << 3); - GPIOH_ENABLE |= (1 << 3); + GPIO_CLEAR_BITWISE(GPIOH_OUTPUT_VAL, 1 << 3); + GPIO_SET_BITWISE(GPIOH_OUTPUT_EN, 1 << 3); + GPIO_SET_BITWISE(GPIOH_ENABLE, 1 << 3); /* 3. Drive CLOCK high */ - GPIOH_OUTPUT_VAL |= (1 << 4); - GPIOH_OUTPUT_EN |= (1 << 4); - GPIOH_ENABLE |= (1 << 4); + GPIO_SET_BITWISE(GPIOH_OUTPUT_VAL, 1 << 4); + GPIO_SET_BITWISE(GPIOH_OUTPUT_EN, 1 << 4); + GPIO_SET_BITWISE(GPIOH_ENABLE, 1 << 4); lv24020lp_power(true); } @@ -127,8 +127,8 @@ bool tuner_power(bool status) lv24020lp_power(false); /* set all as inputs */ - GPIOH_OUTPUT_EN &= ~((1 << 5) | (1 << 3) | (1 << 4)); - GPIOH_ENABLE &= ~((1 << 3) | (1 << 4)); + GPIO_CLEAR_BITWISE(GPIOH_OUTPUT_EN, (1 << 5) | (1 << 3) | (1 << 4)); + GPIO_CLEAR_BITWISE(GPIOH_ENABLE, (1 << 3) | (1 << 4)); /* turn off mystery amplification device */ #if defined (SANSA_E200) -- cgit v1.2.3