summaryrefslogtreecommitdiff
path: root/firmware/target/coldfire
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/coldfire')
-rw-r--r--firmware/target/coldfire/mpio/hd300/button-hd300.c41
1 files changed, 23 insertions, 18 deletions
diff --git a/firmware/target/coldfire/mpio/hd300/button-hd300.c b/firmware/target/coldfire/mpio/hd300/button-hd300.c
index 2b7add7820..8239b54e28 100644
--- a/firmware/target/coldfire/mpio/hd300/button-hd300.c
+++ b/firmware/target/coldfire/mpio/hd300/button-hd300.c
@@ -180,7 +180,14 @@ int button_read_device(void)
180#ifndef BOOTLOADER 180#ifndef BOOTLOADER
181 /* Only main hold affects backlight */ 181 /* Only main hold affects backlight */
182 if (hold_button != hold_button_old) 182 if (hold_button != hold_button_old)
183 {
183 backlight_hold_changed(hold_button); 184 backlight_hold_changed(hold_button);
185
186 if ( hold_button )
187 disable_scrollstrip_interrupts();
188 else
189 enable_scrollstrip_interrupts();
190 }
184#endif 191#endif
185 192
186 /* Skip if main hold is active */ 193 /* Skip if main hold is active */
@@ -207,28 +214,26 @@ int button_read_device(void)
207 if (data > 950) 214 if (data > 950)
208 btn |= BUTTON_REC; 215 btn |= BUTTON_REC;
209 } 216 }
210 } 217
211 218 /* Handle GPIOs buttons
212 /* Handle GPIOs buttons 219 *
213 * 220 * GPIO56 active high PLAY/PAUSE/ON
214 * GPIO56 active high PLAY/PAUSE/ON 221 * GPIO45 active low ENTER
215 * GPIO45 active low ENTER 222 * GPIO41 active low MENU
216 * GPIO41 active low MENU 223 */
217 */
218 224
219 data = GPIO1_READ; 225 data = GPIO1_READ;
220 226
221 if (!hold_button) 227 if (data & (1<<24))
222 { 228 btn |= BUTTON_PLAY;
223 if (data & (1<<24))
224 btn |= BUTTON_PLAY;
225 229
226 if (!(data & (1<<13))) 230 if (!(data & (1<<13)))
227 btn |= BUTTON_ENTER; 231 btn |= BUTTON_ENTER;
228 232
229 if (!(data & (1<<9))) 233 if (!(data & (1<<9)))
230 btn |= BUTTON_MENU; 234 btn |= BUTTON_MENU;
231 } 235
236 } /* !button_hold() */
232 237
233 return btn; 238 return btn;
234} 239}