NGW100 Direct access to port

Go To Last Post
11 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Write a kernel module that does what you need.

Hans-Christian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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.

Life's to short for waiting on slow CPU's

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm using buildroot-avr32-v2.3.0. Any examples from which I could start?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Life's to short for waiting on slow CPU's

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thx

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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.

Hans-Christian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Found some examples for an lcd and I'm trying these.
Thanks for your help.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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.

Life's to short for waiting on slow CPU's