diff options
author | Rocco Marco Guglielmi <roccomarco.guglielmi@gmail.com> | 2017-09-19 15:54:47 +0000 |
---|---|---|
committer | Rocco Marco Guglielmi <roccomarco.guglielmi@gmail.com> | 2017-09-19 15:54:47 +0000 |
commit | 72685f5ce81acfb957220cae03445a5b5fcd6d5b (patch) | |
tree | 7cb7af0faa770e651c77fd8c1ee27897e4704e01 /os/hal/boards | |
parent | 371842b010913ba7333caf0ac459ac95bfd6bc0e (diff) | |
download | ChibiOS-72685f5ce81acfb957220cae03445a5b5fcd6d5b.tar.gz ChibiOS-72685f5ce81acfb957220cae03445a5b5fcd6d5b.tar.bz2 ChibiOS-72685f5ce81acfb957220cae03445a5b5fcd6d5b.zip |
Added Push Button Configuration
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10650 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/boards')
-rw-r--r-- | os/hal/boards/ATSAMA5D2_XULT/board.c | 4 | ||||
-rw-r--r-- | os/hal/boards/ATSAMA5D2_XULT/board.h | 3 |
2 files changed, 6 insertions, 1 deletions
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
|