Add Button-Matrix Demo example for nuttx
Looking for a suitable implementation to control a matrix keyboard I unfortunately didn't find it anywhere. An example would be nice, how to define GPIOs for Row and Column, if and how to implement an interrupt mode or polling and how to map the corresponding keys to the corresponding characters/actions.
Compared to the linux-repository, do I need to port the matrix_keypad.c to nuttx first or can the keyboard_upper/keyboard_lower handle this (I do not see anything like activating/deactivating irq, handle read-out by row-iteration etc.)
Yes, I think it's good addition with the current one button framework.
Nice idea @tobiasjaster !!! Also adding support to SX1509 chip is a good idea!
@tobiasjaster you cannot port matrix_keypad.c to NuttX because its license is GPL and this license is not compatible with Apache license. You need to "reinvent the wheel".
Nice idea @tobiasjaster !!! Also adding support to SX1509 chip is a good idea!
Hi @acassis , I'm afraid I don't know what you're trying to tell me with the SX1509. Maybe you mean that if I like to have a demo for a matrix keypad, I should take care of it myself? The desire for a demo comes just from the fact that in the nuttx documentation it says that such a thing with the help of "Input Keyboard" now already goes, but I unfortunately could not find out how that can go. Therefore I would like to have some help here. Such a comment helps me here unfortunately less.
@tobiasjaster you cannot port matrix_keypad.c to NuttX because its license is GPL and this license is not compatible with Apache license. You need to "reinvent the wheel".
I have also seen the license. Since the GPIOs would have to remain architecture-specific anyway, one must "reinvent" here anyway something in the direction upper/lower. In the upper part the interrupts are activated/deactivated and the logic when reading out the rows for each column and in the lower part the definition of the GPIOs happens together with their control. I am at least in such an implementation for my project. Maybe then a generic implementation can flow into the nuttx-repository.
Nice idea @tobiasjaster !!! Also adding support to SX1509 chip is a good idea!
Hi @acassis , I'm afraid I don't know what you're trying to tell me with the SX1509. Maybe you mean that if I like to have a demo for a matrix keypad, I should take care of it myself? The desire for a demo comes just from the fact that in the nuttx documentation it says that such a thing with the help of "Input Keyboard" now already goes, but I unfortunately could not find out how that can go. Therefore I would like to have some help here. Such a comment helps me here unfortunately less.
Hi @tobiasjaster sorry to mix the subjects. Yes, I was just commenting that SX1509 is another nice driver to have on NuttX to support keyboards.
@tobiasjaster you cannot port matrix_keypad.c to NuttX because its license is GPL and this license is not compatible with Apache license. You need to "reinvent the wheel".
I have also seen the license. Since the GPIOs would have to remain architecture-specific anyway, one must "reinvent" here anyway something in the direction upper/lower. In the upper part the interrupts are activated/deactivated and the logic when reading out the rows for each column and in the lower part the definition of the GPIOs happens together with their control. I am at least in such an implementation for my project. Maybe then a generic implementation can flow into the nuttx-repository.
@tobiasjaster that will be really nice! This is the kind of contribution that NuttX needs to help more people to use simple matrix keyboards using GPIOs. Please let me know if you need someone to review it. Also I'll love to create a video tutorial about it and release it at NuttX Channel.