- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm currently using a Kernel module for LED PIO as a character device. I control it with fopen, fprintf, fread in my application. But I would like to write integer and use 32 bit registers. I know i could use fwrite but i'm not sure the module can handle it. What can i do in order to send integers instead of bytes to the kernel module? ;)Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unix file io is all character/byte based, the stdio functions are best used for text!
You probably ought to use open/read/write/close rather than the stdio forms, at least they'll generate one system call per function call... For device control look at ioctl().
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page