开发者

read/write /dev/ttySDIO0 like a file?

开发者 https://www.devze.com 2023-01-31 19:25 出处:网络
Need to read/write开发者_运维技巧 to a tty SDIO device in an user space program in using JNI in Android.

Need to read/write开发者_运维技巧 to a tty SDIO device in an user space program in using JNI in Android. Is it possible to open the device (/dev/ttySDIO0) using fopen and read/write as a normal file?

From the terminal apps it is possible to do cat/echo to it. However I am looking for a approach which can be used in a program.

I don't see the .read operation defined in the SDIO UART driver.

Thank you.

EDIT: I am using Android Dev Phone 1 which has Android 1.6 (Linux Kernel Version 2.6.29).


When I browsed the SDIO driver source from the latest Linux Kernel Version 2.6.34. It has added file_operations structure which has .read operation listed. I realized I need to upgrade the Android to resolve the issue.

Thank you all for your time, effort and answers.

0

精彩评论

暂无评论...
验证码 换一张
取 消