Hi,
I want to connect a 2x20 lcd character display to the ngw100 and think that using the sysfs .../gpioXX method would be a lot of overhead. I would like to write directory to the pins of eg PORTE. I've seen references to gpio_set_value and alike, but I'm unable to include asm/io.h or pio.h and alike.
Any hints on how to correct this?
Thx,
Geert
NGW100 Direct access to port
Write a kernel module that does what you need.
Thanks for the reply. As I never made a kernel module, I'm afraid that will take me a lot of time to understand how to ...
Could this be done easily using avr32 studio?
No... Kernel development does not go to well with avr32studio.. You can include your own makefiles and get it to work but you cant deplay/debug them.
I'm using buildroot-avr32-v2.3.0. Any examples from which I could start?
Thx
Made a test kernel module. Simpler then expected, thanks for the hint.
Is there a possibility to call functions from that module, or does all communication has to be done via a device? Eg create a /dev/lcd?
Would be nice if I could just use functions from the user space program to call the module internal functions.
No, you can not call functions in kernel space from user space. You must go through a character interface or similar. Have you looked at how other LCD drivers are implemented? AFAIK there are other drivers made for Linux which interfaces a character display.
Found some examples for an lcd and I'm trying these.
Thanks for your help.
For small config setting it could also be ok to use the sysfs interface for that. Like toggling a setting for the module. Ir you can use the ioctl interfate to the /dev/nn driver.