diff --git a/boards/arm/samv7/same70-qmtech/src/sam_bringup.c b/boards/arm/samv7/same70-qmtech/src/sam_bringup.c index 1740bf44eb..e66f60bb15 100644 --- a/boards/arm/samv7/same70-qmtech/src/sam_bringup.c +++ b/boards/arm/samv7/same70-qmtech/src/sam_bringup.c @@ -39,6 +39,14 @@ #include "same70-qmtech.h" +#ifdef CONFIG_INPUT_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS_LOWER +# include +#else +# include +#endif +#endif + #ifdef HAVE_HSMCI # include "board_hsmci.h" #endif /* HAVE_HSMCI */ @@ -94,6 +102,23 @@ int sam_bringup(void) } #endif +#ifdef CONFIG_INPUT_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS_LOWER + /* Register the BUTTON driver */ + + ret = btn_lower_initialize("/dev/buttons"); + if (ret != OK) + { + syslog(LOG_ERR, "ERROR: btn_lower_initialize() failed: %d\n", ret); + return ret; + } +#else + /* Enable BUTTON support for some other purpose */ + + board_button_initialize(); +#endif /* CONFIG_INPUT_BUTTONS_LOWER */ +#endif /* CONFIG_INPUT_BUTTONS */ + #ifdef HAVE_HSMCI /* Initialize the HSMCI0 driver */