Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

PIO Kernel module

Altera_Forum
Honored Contributor II
849 Views

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 II
70 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