diff options
Diffstat (limited to 'firmware/target/arm/as3525/sansa-clip/button-clip.c')
-rw-r--r-- | firmware/target/arm/as3525/sansa-clip/button-clip.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/firmware/target/arm/as3525/sansa-clip/button-clip.c b/firmware/target/arm/as3525/sansa-clip/button-clip.c index b6da130d2f..2d2a3a661e 100644 --- a/firmware/target/arm/as3525/sansa-clip/button-clip.c +++ b/firmware/target/arm/as3525/sansa-clip/button-clip.c | |||
@@ -46,8 +46,9 @@ int button_read_device(void) | |||
46 | 46 | ||
47 | /* This is a keypad using C4-C6 as columns and B0-B2 as rows */ | 47 | /* This is a keypad using C4-C6 as columns and B0-B2 as rows */ |
48 | GPIOC_PIN(4) = (1<<4); | 48 | GPIOC_PIN(4) = (1<<4); |
49 | asm volatile("nop\nnop\nnop\nnop\nnop\n"); /* small delay */ | ||
49 | 50 | ||
50 | /* C4B0 is unused */ | 51 | (void)GPIOB_PIN(0); /* C4B0 is unused */ |
51 | 52 | ||
52 | if (GPIOB_PIN(1)) | 53 | if (GPIOB_PIN(1)) |
53 | result |= BUTTON_VOL_UP; | 54 | result |= BUTTON_VOL_UP; |
@@ -58,6 +59,7 @@ int button_read_device(void) | |||
58 | GPIOC_PIN(4) = 0x00; | 59 | GPIOC_PIN(4) = 0x00; |
59 | 60 | ||
60 | GPIOC_PIN(5) = (1<<5); | 61 | GPIOC_PIN(5) = (1<<5); |
62 | asm volatile("nop\nnop\nnop\nnop\nnop\n"); /* small delay */ | ||
61 | 63 | ||
62 | if (GPIOB_PIN(0)) | 64 | if (GPIOB_PIN(0)) |
63 | result |= BUTTON_LEFT; | 65 | result |= BUTTON_LEFT; |
@@ -71,6 +73,7 @@ int button_read_device(void) | |||
71 | GPIOC_PIN(5) = 0x00; | 73 | GPIOC_PIN(5) = 0x00; |
72 | 74 | ||
73 | GPIOC_PIN(6) = (1<<6); | 75 | GPIOC_PIN(6) = (1<<6); |
76 | asm volatile("nop\nnop\nnop\nnop\nnop\n"); /* small delay */ | ||
74 | 77 | ||
75 | if (GPIOB_PIN(0)) | 78 | if (GPIOB_PIN(0)) |
76 | result |= BUTTON_DOWN; | 79 | result |= BUTTON_DOWN; |