|
Hi guys,
it's my first post, so excuse me if I miss some rules (and for my bad english).
I've just got a small OrangePiLite, put ARMBIAN 5.25 on, tested some thing all around.
I see a power button , but pressing (short or long) nothing happens.
1 - First question
Is it really unused? Isn't there a way to enable event on pushing it ?
So I looked into interrupts tables with
watch cat /proc/interrupts
and noticed two values incrementing when I pushed/released it (counter 3 and 77 for CPU0)
CPU0 CPU1 CPU2 CPU3
3: 3 0 0 0 sunxi_gpio_irq_chip gk_EINT
77: 3 0 0 0 GIC PL
2 - Second question
Hot could I monitor this event ?
Another thing I notice is correspondence with GPIO355 so, I wrote this tiny quick&dirty bash script to use it ...
#!/bin/bash
#modprobe gpio_sunxi
if [ ! -d /sys/class/gpio/gpio355 ]; then
echo 355 > /sys/class/gpio/export
fi
if [ -d /sys/class/gpio/gpio355 ]; then
echo "in" > /sys/class/gpio/gpio355/direction
echo ERROR - LISTENING FOR EVENT ON GPIO355
while ( true ) ; do
if [ $(cat /sys/class/gpio/gpio355/value) -eq "0" ] ; then
echo "RESET"
fi
sleep 1
done
else
echo ERROR - CANNOT ENABLE GPIO355
fi
but ...
3 - Third question
Which is the real function of this this button? and the correct (and canonical) way to read its events ?
Thanks in advance, for any suggetsion.
--
AlexIT
|
|