mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +08:00
boards/arm/samv7/same70-qmtech: add buttons interface
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
committed by
Xiang Xiao
parent
47a09ed255
commit
5669ac8e43
@@ -39,6 +39,14 @@
|
|||||||
|
|
||||||
#include "same70-qmtech.h"
|
#include "same70-qmtech.h"
|
||||||
|
|
||||||
|
#ifdef CONFIG_INPUT_BUTTONS
|
||||||
|
#ifdef CONFIG_INPUT_BUTTONS_LOWER
|
||||||
|
# include <nuttx/input/buttons.h>
|
||||||
|
#else
|
||||||
|
# include <nuttx/board.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_HSMCI
|
#ifdef HAVE_HSMCI
|
||||||
# include "board_hsmci.h"
|
# include "board_hsmci.h"
|
||||||
#endif /* HAVE_HSMCI */
|
#endif /* HAVE_HSMCI */
|
||||||
@@ -94,6 +102,23 @@ int sam_bringup(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#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
|
#ifdef HAVE_HSMCI
|
||||||
/* Initialize the HSMCI0 driver */
|
/* Initialize the HSMCI0 driver */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user