4 Feb
2011
4 Feb
'11
3:05 p.m.
On Fri, Feb 04, 2011 at 09:20:52AM +0530, Harsha, Priya wrote:
By the way, this logic for reporting the buttons separately to the detection of the headset/headphone status is something that should be pulled out into generic code as the same mechanism is going to be needed by anything using voltage based detection.
But here, we don't do button press detection based on voltage. We get a separate value being set in register when interrupt is generated. In the generic code of adding zones and retrieving type, we can add the button press.
Right, but one common way of doing multiple buttons is to use the detection of the short to trigger an ADC reading and then look at the value.