BPI-M3 GPIO Pin direction change

(Sumitha Thumma) #1

I am using Banana PI -M3 board.I am using GPIO pins PH5 it is in default output mode. now i want to change to Input mode how to do that using Command prompt

to read data I am using

cat /sys/class/gpio_sw/PH5/data

to write echo 0 > /sys/class/gpio/PH5/data

these 2 command are working as it is in output mode

now i want to change direction to input mode

please help me to solve this issue