Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Rock/Android Gpio

How to use gpio on rock pro with android4.4

1) Download firmware and source code


Note: the apk to control gpio must run on the firmware contains gpioctl device. No matter the prebuilt like the first link. Or build yourself (refer to part 4)

2)unzip the firmware(,and flash the image (refer to Rock/flash_the_image)

unzip the source code(radxa-gpio-demo(20151204).zip)

Import the radxa-gpio-demo(with_so) or radxa-gpio-demo(with_jni_code) to AndroidStudio and compile,

(The demo is writen by AndroidStudio 1.3.2) the run the apk on your rock pro

3)How to control the gpio on android. Please read the code

4)How to add the driver in kernel

cd kernel
patch -p 1 < 0001-add-gpio-ctrl-driver.patch  //the file contained in the radxa-gpio-demo(20151204).zip

then recompile the kernel