summaryrefslogtreecommitdiff
path: root/firmware/target/arm/iriver/h10/button-h10.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/iriver/h10/button-h10.c')
-rw-r--r--firmware/target/arm/iriver/h10/button-h10.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/firmware/target/arm/iriver/h10/button-h10.c b/firmware/target/arm/iriver/h10/button-h10.c
index ac09d245e6..fe5fff6592 100644
--- a/firmware/target/arm/iriver/h10/button-h10.c
+++ b/firmware/target/arm/iriver/h10/button-h10.c
@@ -34,15 +34,15 @@
34void button_init_device(void) 34void button_init_device(void)
35{ 35{
36 /* Enable REW, FF, Play, Left, Right, Hold buttons */ 36 /* Enable REW, FF, Play, Left, Right, Hold buttons */
37 GPIOA_ENABLE |= 0xfc; 37 GPIO_SET_BITWISE(GPIOA_ENABLE, 0xfc);
38 38
39 /* Enable POWER button */ 39 /* Enable POWER button */
40 GPIOB_ENABLE |= 0x1; 40 GPIO_SET_BITWISE(GPIOB_ENABLE, 0x01);
41 41
42 /* We need to output to pin 6 of GPIOD when reading the scroll pad value */ 42 /* We need to output to pin 6 of GPIOD when reading the scroll pad value */
43 GPIOD_ENABLE |= 0x40; 43 GPIO_SET_BITWISE(GPIOD_ENABLE, 0x40);
44 GPIOD_OUTPUT_EN |= 0x40; 44 GPIO_SET_BITWISE(GPIOD_OUTPUT_EN, 0x40);
45 GPIOD_OUTPUT_VAL |= 0x40; 45 GPIO_SET_BITWISE(GPIOD_OUTPUT_VAL, 0x40);
46} 46}
47 47
48bool button_hold(void) 48bool button_hold(void)
@@ -97,10 +97,10 @@ int button_read_device(void)
97 /* Read scroller */ 97 /* Read scroller */
98 if ( GPIOD_INPUT_VAL & 0x20 ) 98 if ( GPIOD_INPUT_VAL & 0x20 )
99 { 99 {
100 GPIOD_OUTPUT_VAL &=~ 0x40; 100 GPIO_CLEAR_BITWISE(GPIOD_OUTPUT_VAL, 0x40);
101 udelay(250); 101 udelay(250);
102 data = adc_scan(ADC_SCROLLPAD); 102 data = adc_scan(ADC_SCROLLPAD);
103 GPIOD_OUTPUT_VAL |= 0x40; 103 GPIO_SET_BITWISE(GPIOD_OUTPUT_VAL, 0x40);
104 104
105 if(data < 0x224) 105 if(data < 0x224)
106 { 106 {