[PATCH] interface for configuring freefall/wakeup interrupts for the accelerometers
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Fri Aug 15 14:20:13 CEST 2008
On 15.08.2008 10:20, Simon Kagstrom wrote:
> Add configuration of wakeup/freefall interrupts through a sysfs
> interface. Configuration is done through echoing a value of the
> form
>
> X Y Z THRESHOLD DURATION SPEC
>
> to freefall_wakeup_1/2. X, Y and Z are threshold values, given as a
> value > 0, < 0 or 0 to specify if an interrupt should be generated for
> high or low thresholds or neither (off). THRESHOLD specifies the
> threshold that must be exceeded. DURATION specifies the time in
> milliseconds for which the acceleration should be measured. SPEC is
> either '1' or '0' and specifies if the thresholds should be taken all
> together or one at a time ('and' or 'or' mode).
>
Cool! How fast is our wakeup at the moment? I want the Freerunner to
emit a frightened scream via loudspeaker during freefall (after freefall
it wouldn't be as impressive) and a broken glass simulation on the
display after impact. That broken glass effect will then disappear over
the duration of a few minutes, suggesting self-healing to the baffled
observer. I'll code something up to that effect.
;-)
Too long delays would somewhat defeat the usage of the accelerometers
for this purpose.
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
More information about the openmoko-kernel
mailing list