Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
811 Views

PIO Kernel module

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? 

;)
0 Kudos
1 Reply
Altera_Forum
Honored Contributor I
32 Views

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