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:
Fabio Baltieri 2023-06-17 15:50:18 +01:00 committed by Fabio Baltieri
commit 15f78fa545
2 changed files with 4 additions and 12 deletions

View file

@ -1 +1,5 @@
CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y
CONFIG_INPUT=y
CONFIG_INPUT_EVENT_DUMP=y

View file

@ -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)
{