Rockbox Technical Forums
Rockbox Development => Starting Development and Compiling => Topic started by: ciel on July 11, 2018, 12:49:47 PM
-
In firmware/target/arm/as3525/sansa-clipplus/button-clip.c, in the function button_read_device() lines 43-53, the code does some special handling for port D6. Does anyone know the details, e.g. why does B0 need to be set and unset? where do the number of cycles to delay for come from?
-
https://www.rockbox.org/wiki/Main/SansaAMSHardwareMappings#Button_readout
The delay is to allow enough time for the gpio to settle to the new value.
Edit: sorry you mean clip+. Not sure what that resets.
-
As far as I can tell the clip+ doesn't need B0 set/unset and therefore doesn't need the delay to settle either..
I've a patch here:
http://gerrit.rockbox.org/r/#/c/1757/6/firmware/target/arm/as3525/sansa-clipplus/button-clip.c
-
OK. I'm guessing it could be a remnant of the row/column keyscan method that the other Sansa devices use but the clip+ does not.
-
possibly but thats not to say there isn't a clip+ out there that needs it maybe some other hardware revision thats why I left the code and just defined it out..