问题
can i emulate a custom keypad with input_dev (from input.h)
//an example with just one key.
button_dev = input_allocate_device();
if (!button_dev) {
printk(KERN_ERR "button.c: Not enough memory\n");
error = -ENOMEM;
goto err_free_irq;
}
button_dev->evbit[0] = BIT_MASK(EV_KEY);
button_dev->keybit[BIT_WORD(BTN_0)] = BIT_MASK(BTN_0);
or i will have to use matrix_keypad header file?If yes then How?
来源:https://stackoverflow.com/questions/45382982/how-to-use-the-matrix-keypad-h-file-for-a-custom-keypad-driver