Forum Discussion
Altera_Forum
Honored Contributor
17 years agoPIO testing
Hi guys, I'm new to the uClinux, just got it to work and ran the traditional "Hello World" app :rolleyes: now I'm trying something new so before I get tangled, quick q to access a PI...
Altera_Forum
Honored Contributor
17 years agoThe ko file should end up in a directory similar to this: ~/nios/uClinux-dist/romfs/lib/modules/2.6.30-00471-g2e1b9d6/kernel
>do I use "fopen"/"fclose" in my app to open/close a device file (like /dev/pio_buttons)? In Linux, a character device is just a (virtual) file. The device code needs to provide handlers for the different user space actions like open, close, read, write, ioctl, mmap, select, ... . (IIRC, fopen is a user space wrapper for open, You can use fprintf with a device that just provide a write handler.) -Michael