Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.


  Search this Thread
Old 11-28-2010, 01:28 AM   #1
LQ Newbie
Registered: Nov 2010
Posts: 6

Rep: Reputation: 0
Custom serial keypad driver

Hello. I am working on a custom board with an s3c2410 processor. The device it is used in has a series of buttons that form a keypad. These keys are attached to a microcontroller that generates serial output. Essentially, the keypad is a serial keyboard, attached to ttySAC1 at 9600-8N1. The keycodes for the keys are not standard ascii. There is a custom keycode table.

Previous software that used this device (under linux 2.4 kernel) relied on the application to poll the serial port and lookup the keycode. As I am in the process of bringing everything current on the 2.6 kernel, I would like to treat this serial keypad as a standard input device.

I've not found any standard driver for a serial keyboard that would let me specify my own key codes. I've looked into the "inputattach" program, but not had much success since it is built for certain devices only. I thought about possibly adding my own code to patch inputattach. Is this a good approach? Or is there a simpler way that I am overlooking? Do I need anything as far as a kernel mode driver, or would a patched inputattach by itself be a good solution?

Also - Ultimately I would like to be able to use this numeric keypad in a multi-press alphanumeric mode, similar to texting on a cell-phone. Surely there is code already written to do this somewhere? Or do I have to write from scratch? Please advise.

Old 12-01-2010, 09:13 AM   #2
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,397
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
As I understand it, the keyboard driver is normally a built-in kernel driver. If you look in the kernel sources (drivers/input/keyboard/...), you should find code for existing keyboards and other similar devices as examples of how to implement your device.
--- rod.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Which driver type suits my custom serial device best? ansidor Programming 1 09-15-2010 04:55 PM
Matrix keypad driver for uclinux fairuz.ismail Linux - Hardware 1 06-09-2010 05:29 PM
Matrix keypad driver for uclinux fairuz.ismail Programming 1 06-08-2010 10:05 AM
uclinux and custom keypad driver Киприан Programming 0 02-09-2010 03:02 AM
Linux KeyPad Driver on Target board MKSrivastava Linux - Laptop and Netbook 0 01-22-2006 10:18 PM > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 02:19 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration