Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  switching the hold button?
« previous next »
  • Print
Pages: [1]

Author Topic: switching the hold button?  (Read 2043 times)

Offline cvitullo

  • Member
  • *
  • Posts: 25
switching the hold button?
« on: September 24, 2007, 05:08:54 PM »
this seems easy in theory, but is it possible to switch the direction of the hold switch on the sansa? so when it would normally be engaged, it is off, and vice versa.
Logged

Offline Mad Cow

  • Member
  • *
  • Posts: 445
Re: switching the hold button?
« Reply #1 on: September 24, 2007, 06:43:10 PM »
It's very possible, you would need to go into the button handling code and switch around the two hold switch position ADC readings. It should be easy, unless I'm understanding something wrong here.

EDIT: A quick look through the sansa's button code confused me, the hold didn't work like I thought it did from what I saw.

EDIT2: Actually, it looks pretty easy. On line 250 of firmware\target\arm\/sandisk/sansa-e200/button-e200.c change
Code: [Select]
    hold_button = (state & 0x80) != 0;
to whatever value is read when hold is off. At least I think that would be it.
« Last Edit: September 24, 2007, 06:52:25 PM by Mad Cow »
Logged
iRiver H10 5GB, Gigabeat F40, Gigabeat S60, all rockboxed. :P

Offline cvitullo

  • Member
  • *
  • Posts: 25
Re: switching the hold button?
« Reply #2 on: September 24, 2007, 08:05:43 PM »
thanks a bunch! it's been bugging me since you have to wedge your finger in between the headphones and the switch to turn it off, and it felt like it should be switched.
Logged

Offline cvitullo

  • Member
  • *
  • Posts: 25
Re: switching the hold button?
« Reply #3 on: September 24, 2007, 08:45:25 PM »
sorry to be a n00b, but where's the code? i'd try to edit it, but i can't find it.
Logged

Offline Mad Cow

  • Member
  • *
  • Posts: 445
Re: switching the hold button?
« Reply #4 on: September 24, 2007, 09:57:01 PM »
http://www.rockbox.org/twiki/bin/view/Main/SimpleGuideToCompiling

Read up, it's confusing at first, but almost anybody can do it if they really tried. I had no previous coding experience and I ran a custom build for a while, it's really easy once you get the hang of it.
Logged
iRiver H10 5GB, Gigabeat F40, Gigabeat S60, all rockboxed. :P

Offline TheExtradition

  • Member
  • *
  • Posts: 4
Re: switching the hold button?
« Reply #5 on: September 25, 2007, 07:46:43 PM »
It seems really confusing.
Logged

Offline Mad Cow

  • Member
  • *
  • Posts: 445
Re: switching the hold button?
« Reply #6 on: September 25, 2007, 10:49:46 PM »
Quote from: TheExtradition on September 25, 2007, 07:46:43 PM
It seems really confusing.

That's what I though at first too, just follow the steps word for word and you should get the hang of it.
Logged
iRiver H10 5GB, Gigabeat F40, Gigabeat S60, all rockboxed. :P

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  switching the hold button?
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.072 seconds with 14 queries.