Forum Discussion
Altera_Forum
Honored Contributor
17 years agoDoes anyboy use "struct semaphore" and down(struct semaphore
Hello everyone, I use the latest version of nios2-linux(nios2-linux-20090730),when I test the driver nios2-linux/linux-2.6/drivers/char/altera_pio_button.c,I found that the function down(s...
Altera_Forum
Honored Contributor
16 years agoThe pio port base should remapped to uncached. Try# define PIO_BUTTON_BASE (na_button_pio | 0x80000000) I've never used that driver myself. It is just a personal taste. I prefer using gpio and input subsystem which supports polling instead of interrupt driven. Please see the example at linux-2.6/drivers/input/mouse/gpio_mouse.c . http://www.nioswiki.com/gpio (http://www.nioswiki.com/gpio) - Hippo