1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Michael Sevakis 2010-06-22 04:00:34 +00:00
parent 94c23e167c
commit 831707d991
2 changed files with 37 additions and 29 deletions

View file

@ -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)