diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-02-11 21:49:38 +0800 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-02-16 18:17:30 +0800 |
commit | ef654d161766c13e002f2bf738007ccf44d84749 (patch) | |
tree | 7832b5c0be73693de74382f6c896496ba0c665da /include/gpio_keys.h | |
parent | 4b06ebc820aa9a46dfb73c7050b073d8224b4b70 (diff) | |
download | barebox-ef654d161766c13e002f2bf738007ccf44d84749.tar.gz barebox-ef654d161766c13e002f2bf738007ccf44d84749.tar.xz |
add gpio keyboard support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'include/gpio_keys.h')
-rw-r--r-- | include/gpio_keys.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/gpio_keys.h b/include/gpio_keys.h new file mode 100644 index 0000000000..fc548fabcd --- /dev/null +++ b/include/gpio_keys.h @@ -0,0 +1,30 @@ +#ifndef _GPIO_KEYS_H +#define _GPIO_KEYS_H + +#include <poller.h> +#include <kfifo.h> + +struct gpio_keys_button { + /* Configuration parameters */ + int code; + + int gpio; + int active_low; + + /* internal */ + int previous_state; +}; + +struct gpio_keys_platform_data { + struct gpio_keys_button *buttons; + int nbuttons; + + /* optional */ + int fifo_size; + + struct kfifo *recv_fifo; + struct poller_struct poller; + struct console_device cdev; +}; + +#endif |