Denis 'GNUtoo' Carikli
2012-11-27 16:55:44 UTC
Hi,
I tried many times to find a good way to integrate our keypad driver
for the calypso platform, but each time that I grep the source I don't
succeed at finding a good example for integrated keyboard/keypad
drivers that is similar enough to ours.
There seem to be an hid keyboard in
nuttx/drivers/usbhost/usbhost_hidkbd.c, but that's for USB keyboards
and we have a platform specific keypad controller...
Beside it has a public function named usbhost_kbdinit which makes it
sounds like the fact that there is no generic kbdinit. Despite of all
theses problems, should I clone and adapt this driver to our specific
keypad?
I've compiled hexdump and tried it against /dev/keypad produced by our
driver, and it produced the following output while pressing a key
multiples times(it produces a different letter for a different key):
0000: 69 i
/dev/keypad at 0000023d:
0000: 49 I
/dev/keypad at 0000023e:
0000: 69 i
/dev/keypad at 0000023f:
0000: 49 I
I've also found that in shenzhou/nxwm/defconfig in the old config
system(Alan should work on the new Kconfig system for our devices, I'm
not sure of the status of his work):
#
# Keyboard device settings
#
CONFIG_NXWM_KEYBOARD_DEVPATH="/dev/console"
CONFIG_NXWM_KEYBOARD_SIGNO=6
CONFIG_NXWM_KEYBOARD_BUFSIZE=16
CONFIG_NXWM_KEYBOARD_LISTENERPRIO=50
CONFIG_NXWM_KEYBOARD_LISTENERSTACK=1024
But that's for NXWM,however it takes a dev path... and the driver we
have produces some characters, obviously it has to be fixed to produce
the right characters/numbers.
I've attached the current keypad driver.
Beside that I've a small compilation fix for the calypso platform,
using the old config system.
Denis.
I tried many times to find a good way to integrate our keypad driver
for the calypso platform, but each time that I grep the source I don't
succeed at finding a good example for integrated keyboard/keypad
drivers that is similar enough to ours.
There seem to be an hid keyboard in
nuttx/drivers/usbhost/usbhost_hidkbd.c, but that's for USB keyboards
and we have a platform specific keypad controller...
Beside it has a public function named usbhost_kbdinit which makes it
sounds like the fact that there is no generic kbdinit. Despite of all
theses problems, should I clone and adapt this driver to our specific
keypad?
I've compiled hexdump and tried it against /dev/keypad produced by our
driver, and it produced the following output while pressing a key
multiples times(it produces a different letter for a different key):
0000: 69 i
/dev/keypad at 0000023d:
0000: 49 I
/dev/keypad at 0000023e:
0000: 69 i
/dev/keypad at 0000023f:
0000: 49 I
I've also found that in shenzhou/nxwm/defconfig in the old config
system(Alan should work on the new Kconfig system for our devices, I'm
not sure of the status of his work):
#
# Keyboard device settings
#
CONFIG_NXWM_KEYBOARD_DEVPATH="/dev/console"
CONFIG_NXWM_KEYBOARD_SIGNO=6
CONFIG_NXWM_KEYBOARD_BUFSIZE=16
CONFIG_NXWM_KEYBOARD_LISTENERPRIO=50
CONFIG_NXWM_KEYBOARD_LISTENERSTACK=1024
But that's for NXWM,however it takes a dev path... and the driver we
have produces some characters, obviously it has to be fixed to produce
the right characters/numbers.
I've attached the current keypad driver.
Beside that I've a small compilation fix for the calypso platform,
using the old config system.
Denis.