Firefly开源社区

打印 上一主题 下一主题

How to control GPIO in Android application?

26

积分

0

威望

0

贡献

游客

积分
26

How to control GPIO in Android application?

发表于 2015-9-9 16:10:05      浏览:8012 | 回复:6        打印     [复制链接] 楼主
Hi,

I want to create android application that is able to control GPIO, LED, Serial port.
I've searched a lot but can't get enough of good solution.
The following is the programming path which I understand.

Android App (Java) ---> Android JNI ---> Android Native Code (C/C++) ---> ??? ---> Device Drivers

. How can I access the Device Drivers (GPIO, LED, Serial port) in Android Native C/C++ code?

. Do I need to modify or create existing device driver for using GPIO, LED, Serial port?

. Is there library provided to read/write specific resource like "/sys/class/gpio/gpio91/value"?

. Would you let me know how to access GPIO, LED, Serial port in Android App with sample source code or SDK?


Thanks.
回复

使用道具 举报

26

积分

0

威望

0

贡献

游客

积分
26
发表于 2015-9-10 09:06:23      沙发
thanks.

in your sample, how can I build luobogpio.c (driver) file and put luobogpio.o (maybe..) file into dev/luobogpio?
回复

使用道具 举报

26

积分

0

威望

0

贡献

游客

积分
26
发表于 2015-9-10 13:38:42      板凳
I want to know how to build custom driver file. (not to build android sdk)
meaning of build custom driver file indicates that adding a new file (luobogpio.c into where?), modifying Makefile, creating object file, and so on.

still don't get it enough...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表