I have configured button definition in the mach-file as below:
.desc = "LAN WIFI button",
.type = EV_KEY,
.code = KEY_LAN_WIFI_BUTTON,
.debounce_interval = DB120_KEYS_DEBOUNCE_INTERVAL,
.g
Afkar Rafique schrieb am 16.10.2015 um 03:47:
> Thanks for the reply.
>
> I have change the script as below:
>
> #!/bin/sh /etc/rc.common
>
> START=19
> start() {
> echo in > /sys/class/gpio/gpio16/direction 2> /dev/null
> echo 16 > /sys/class/gpio/export 2> /dev/nu
Thanks for the reply.
I have change the script as below:
#!/bin/sh /etc/rc.common
START=19
start() {
echo in > /sys/class/gpio/gpio16/direction 2> /dev/null
echo 16 > /sys/class/gpio/export 2> /dev/null
if [ "$(cat /sys/class/gpio/gpio16/value)" == "1" ] ; then
Afkar Rafique schrieb am 15.10.2015 um 04:07:
> Thanks for the reply.
>
> i have Create /etc/init.d/buttons and written below script:
>
> #!/bin/sh /etc/rc.common
> START=19
> start() {
> /bin/umount /etc/config 2>/dev/null
> echo out > /sys/class/gpio/gpio16/direction 2> /dev/nul
Thanks for the reply.
i have Create /etc/init.d/buttons and written below script:
#!/bin/sh /etc/rc.common
START=19
start() {
/bin/umount /etc/config 2>/dev/null
echo out > /sys/class/gpio/gpio16/direction 2> /dev/null
echo 16 > /sys/class/gpio/export 2> /dev/null
On Wed, Oct 14, 2015 at 12:19 PM, Afkar Rafique wrote:
> Could anyone please explain how i can configure and read GPIO value.
There's an article on the wiki which explains how to set a GPIO to a
specific value: [0]
If you want to read a GPIO value then you use direction "in" and then
simply cat to
Am Wed, 14 Oct 2015 18:19:45 +0800
schrieb Afkar Rafique :
> Hi,
>
> I am working on AR9344 Openwrt. I need to configure the GPIO16 and
> read the status of GPIO.
>
> Based on GPIO read value, has to ON/OFF the status LED.
>
> Could anyone please explain how i can configure and read GPIO value.
Hi,
I am working on AR9344 Openwrt. I need to configure the GPIO16 and read the
status of GPIO.
Based on GPIO read value, has to ON/OFF the status LED.
Could anyone please explain how i can configure and read GPIO value.
Regards,
___
openwrt-devel mai