Glomation
 
Advanced Search
Welcome, Guest. Please login or register.

Login with username, password and session length
February 05, 2012, 06:24:42 AM
News: Glomation introduced new wireless ready low cost GESBC-9260S
Pages: 1 2 3 [4]
Topic Tools  
Read April 26, 2010, 09:15:48 AM #45
SteveMartins

Re: GPIO driver

I have added:

        {
                .gpio           = AT91_PIN_PB8,
                .code           = KEY_A,
                .desc           = "A",
                .active_low     = 1,
                .wakeup         = 1,
        }

and:

        at91_set_gpio_input(AT91_PIN_PB8, 1);  /* btn1 */
        at91_set_deglitch(AT91_PIN_PB8, 1);


to /arch/arm/mach-at91/board-sam9260ek.c which enables 9 as an input. I can see the input by creating a node:

mknod /dev/input/event0 c 13 64

(major and minor values from cat /sys/class/input/event0/dev)

Can anyone tell me if its possible to have this as a keyboard input, so when i press the button the letter 'A' appears on the console?

thanks,

Steve
 
Read April 28, 2010, 04:00:36 PM #46
admin

Re: GPIO driver

You can write a program to constantly pulling the GPIO pin to accomplish what you wanted but that will use a lot of system resources.  The best way to do this is to implement as a driver with the GPIO pin set as interrupt source.
 
Pages: 1 2 3 [4]
Jump to:  

Theme Update by Runic Warrior Originally created by m3talc0re