samples: input_dump: use CONFIG_INPUT_EVENT_DUMP
Now that input dump functionalities are at subsystem level, drop the custom code from the sample, just enable CONFIG_INPUT_EVENT_DUMP. Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit is contained in:
parent
a22fbfd1eb
commit
15f78fa545
2 changed files with 4 additions and 12 deletions
|
@ -1 +1,5 @@
|
|||
CONFIG_LOG=y
|
||||
CONFIG_LOG_MODE_MINIMAL=y
|
||||
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_EVENT_DUMP=y
|
||||
|
|
|
@ -5,18 +5,6 @@
|
|||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <zephyr/input/input.h>
|
||||
|
||||
static void input_cb(struct input_event *evt)
|
||||
{
|
||||
printf("input event: dev=%-16s %3s type=%2x code=%3d value=%d\n",
|
||||
evt->dev ? evt->dev->name : "NULL",
|
||||
evt->sync ? "SYN" : "",
|
||||
evt->type,
|
||||
evt->code,
|
||||
evt->value);
|
||||
}
|
||||
INPUT_LISTENER_CB_DEFINE(NULL, input_cb);
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue