Rockbox Development > New Ports
SanDisk Sansa c200v2, m200v4, clipv1, clipv2, clip+, and fuzev2
kugel.:
--- Quote from: FlynDice on February 01, 2009, 01:38:13 PM ---I've tried this code to get the rec button. It sees the rec button as pressed during startup and clears my settings sending me back into cabbiev and buttons/wheel don't work anymore. Is there a reason for making a bool _button_rec variable?
static void get_rec(void)
{
if (!(_dbop_din & (1<<15)))
int_btn |= BUTTON_REC;
}
--- End quote ---
That should work. But you need to reset the button state at the beginning of the dbop function (int_btn &= ~BUTTON_REC), and call get_rec at the end of it.
FlynDice:
Yes that's what I've done I think. I used this line to reset since get_power could also modify int_btn.
int_btn &= ~(BUTTON_REC|
BUTTON_POWER);
EDIT: I think I got the REC button working by putting in a bypass while rockbox is booting up. I'm not sure how to check it out real well but when I press it the button light illuminates and the backlight comes back on. If I can figure out how I'll post a diff to the tracker.
EDIT2: I've tested it in several plugins also (sudoku and calculator and a few others). It is seeing the rec button but it seems something else besides the rec button is setting DBOP 15 to 0 also. In XOBOX the game is paused/unpaused in a regular pattern. I did post a patch to the tracker if anyone wants to play with it some.
weltyj:
I found BUTTON_LEFT on GPIOC2
Found nothing else on GPIO's A or B for buttons, tested both high and low states.
The backlight function as implemented in the SVN trunk does not appear to work. I could see no backlight at all.
Testing in bootloader/sansa_as3525.c:
Buttons work fine via button_read_device(), until a call is made to lcd_init(), at which point I see what appears to be the backlight come on, but the buttons are hosed (I assume because the issue of using GPIOC for both buttons and lcd has not been sorted out yet.)
I tried turning on the backlight with GPIOD 0 thru 6, but no success. Is there any chance GPIOD might be used for BUTTTON_VOL_UP, BUTTON_VOL_DOWN or BUTTON_REC ?
kugel.:
--- Quote from: weltyj on February 05, 2009, 10:23:00 PM ---I found BUTTON_LEFT on GPIOC2
--- End quote ---
On 1 or 0?
--- Quote from: weltyj on February 05, 2009, 10:23:00 PM ---
Found nothing else on GPIO's A or B for buttons, tested both high and low states.
The backlight function as implemented in the SVN trunk does not appear to work. I could see no backlight at all.
Testing in bootloader/sansa_as3525.c:
Buttons work fine via button_read_device(), until a call is made to lcd_init(), at which point I see what appears to be the backlight come on, but the buttons are hosed (I assume because the issue of using GPIOC for both buttons and lcd has not been sorted out yet.)
--- End quote ---
This could very well also be your sansa crashing. The lcd driver is copied from the e200v2, seems it's not working at all. Can you try the Fuze lcd-driver? (Copy lcd-fuze.c into lcd-c200v2.c) I don't think it will work but it's worth a try.
--- Quote from: weltyj on February 05, 2009, 10:23:00 PM ---I tried turning on the backlight with GPIOD 0 thru 6, but no success. Is there any chance GPIOD might be used for BUTTTON_VOL_UP, BUTTON_VOL_DOWN or BUTTON_REC ?
--- End quote ---
Could be, no idea It could also be that you need to switch some other PIN to find other buttons (which could then even be on the same pins as buttons already found). The backlight is certainly not on GPIO though.
weltyj:
--- Quote from: kugel. on February 06, 2009, 01:25:02 AM ---
--- Quote from: weltyj on February 05, 2009, 10:23:00 PM ---I found BUTTON_LEFT on GPIOC2
--- End quote ---
On 1 or 0?
--- End quote ---
On 0, just like all the other buttons.
--- Quote from: kugel. on February 06, 2009, 01:25:02 AM ---This could very well also be your sansa crashing. The lcd driver is copied from the e200v2, seems it's not working at all. Can you try the Fuze lcd-driver? (Copy lcd-fuze.c into lcd-c200v2.c) I don't think it will work but it's worth a try.
--- End quote ---
I'll give it a try.
---
No luck. I tried both the Fuze and the e200v2 drivers. The clip and m200v4 drivers aren't drop in replacements so that will take a little more effort to try those if you think it's possible they'll work.
--- Quote from: kugel. on February 06, 2009, 01:25:02 AM ---
--- Quote from: weltyj on February 05, 2009, 10:23:00 PM ---I tried turning on the backlight with GPIOD 0 thru 6, but no success. Is there any chance GPIOD might be used for BUTTTON_VOL_UP, BUTTON_VOL_DOWN or BUTTON_REC ?
--- End quote ---
Could be, no idea It could also be that you need to switch some other PIN to find other buttons (which could then even be on the same pins as buttons already found). The backlight is certainly not on GPIO though.
--- End quote ---
I am thinking that too -- could be a keyscan col/row setup similar to what's been found on the clip/m200 models, we've just found the first column so far...
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version