From 72685f5ce81acfb957220cae03445a5b5fcd6d5b Mon Sep 17 00:00:00 2001 From: Rocco Marco Guglielmi Date: Tue, 19 Sep 2017 15:54:47 +0000 Subject: Added Push Button Configuration git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10650 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/boards/ATSAMA5D2_XULT/board.c | 4 ++++ os/hal/boards/ATSAMA5D2_XULT/board.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'os/hal/boards') diff --git a/os/hal/boards/ATSAMA5D2_XULT/board.c b/os/hal/boards/ATSAMA5D2_XULT/board.c index 594d67beb..82c4f6de3 100644 --- a/os/hal/boards/ATSAMA5D2_XULT/board.c +++ b/os/hal/boards/ATSAMA5D2_XULT/board.c @@ -78,6 +78,10 @@ static const sama_pio_init_t sama_inits[] = { SAMA_PIN_N(PIOB_LED_RED), SAMA_PIO_FUNC_GPIO | SAMA_PIO_DIR_OUTPUT | SAMA_PIO_DRVSTR_HI, SAMA_PIO_HIGH}, + {SAMA_PIOB, + SAMA_PIN_N(PIOB_USER_PB), + SAMA_PIO_FUNC_GPIO | SAMA_PIO_DIR_INPUT | SAMA_PIO_PUEN | SAMA_PIO_SCHMITT, + SAMA_PIO_HIGH}, {-1, 0, 0, 0} }; diff --git a/os/hal/boards/ATSAMA5D2_XULT/board.h b/os/hal/boards/ATSAMA5D2_XULT/board.h index ec63c6182..7d779660d 100644 --- a/os/hal/boards/ATSAMA5D2_XULT/board.h +++ b/os/hal/boards/ATSAMA5D2_XULT/board.h @@ -116,7 +116,7 @@ #define PIOB_LED_RED 6U #define PIOB_PIN7 7U #define PIOB_PIN8 8U -#define PIOB_PIN9 9U +#define PIOB_USER_PB 9U #define PIOB_PIN10 10U #define PIOB_PIN11 11U #define PIOB_PIN12 12U @@ -215,6 +215,7 @@ #define LINE_LED_BLUE BOARD_LINE(PIOB, 0U) #define LINE_LED_GREEN BOARD_LINE(PIOB, 5U) #define LINE_LED_RED BOARD_LINE(PIOB, 6U) +#define LINE_USER_PB BOARD_LINE(PIOB, 9U) #if !defined(_FROM_ASM_) #ifdef __cplusplus -- cgit v1.2.3