Support and General Use > Hardware
H10 5GB hardware buttons not working anymore
gevaerts:
try splashf() instead of splash()
stanelie:
Yup,
It was splashf, not splash.
I get 17 or 18 as the value. Also, if I push anywhere on the strip as it boots, I get a reading of 400.
The function in button-h10.c compares a hard coded value of 0x224 to determine if it is a DOWN or UP command.
Is the 17 value in hex?
Is this not strange?
Post Merge: April 13, 2011, 01:16:25 PMWether or not the strip is depressed seems to be available in the GPIOD_INPUT_VAL from button-h10.c
How do I go about printing this?
I tried splashf(HZ*2, "The value of adc_scan is: %x", adc_scan(ADC_SCROLLPAD)); b ut I get a "%x expects type 'unsigned int', but the argument 3 has type 'long unsigned int'"
Post Merge: April 13, 2011, 02:48:39 PMOk, I managed to do this :
splashf(HZ*2, "valeur: %lx", GPIOD_INPUT_VAL);
The output is DD when the strip is not depressed and FD while it is depressed.
Is this what I should be reading in a working player?
Post Merge: April 13, 2011, 03:23:25 PMAlso, i did this hoping I would get a readout when I pushed down or up :
/* Read scroller */
if ( GPIOD_INPUT_VAL & 0x20 )
{
GPIO_CLEAR_BITWISE(GPIOD_OUTPUT_VAL, 0x40);
udelay(250);
data = adc_scan(ADC_SCROLLPAD);
GPIO_SET_BITWISE(GPIOD_OUTPUT_VAL, 0x40);
if(data < 0x224)
{
btn |= BUTTON_SCROLL_DOWN;
} else {
btn |= BUTTON_SCROLL_UP;
splashf(HZ*2, "valeur: %lx", GPIOD_INPUT_VAL);
}
}
I do not get a readout. However, I do get a PANIK, but only when I push on the upper part of the scroll strip. If I move my "break point" to the BUTTON_SCROLL_DOWN part of the code, it crashes only when I push down.
All of would indicate that the scroll wheel does get registered within Rockbox. So, then, why won't it scroll??
Post Merge: April 14, 2011, 09:31:31 AMSo,
It's been established that the scroll strip works, and that rockbox is not froozen once done booting.
However, the buttons do not work once rockbox is booted up, except for the power button.
Anything else I should look at? I am really uninspired...
Navigation
[0] Message Index
[*] Previous page
Go to full version