boards: nucleo: provide button and led for basic samples
Provide USER button and LD2 Led defines in order to get basic samples "blinky" and "button" available on nucleo boards. Defines have been named in order to match with board printing. Aliases are provided to get compatibility with zephyr sample code. Change-Id: Ie23a4f63c406def50b94a644d4e136d3bda1ceff Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
parent
9bc293c827
commit
7d7158ccaf
4 changed files with 56 additions and 6 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2015 Intel Corporation
|
||||
* Copyright (c) 2017 Linaro Limited.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -19,4 +20,18 @@
|
|||
|
||||
#include <soc.h>
|
||||
|
||||
/* USER push button */
|
||||
#define USER_PB_GPIO_PORT "GPIOC"
|
||||
#define USER_PB_GPIO_PIN 13
|
||||
|
||||
/* LD2 green LED */
|
||||
#define LD2_GPIO_PORT "GPIOA"
|
||||
#define LD2_GPIO_PIN 5
|
||||
|
||||
/* Create aliases to make the basic samples work */
|
||||
#define SW0_GPIO_NAME USER_PB_GPIO_PORT
|
||||
#define SW0_GPIO_PIN USER_PB_GPIO_PIN
|
||||
#define LED0_GPIO_PORT LD2_GPIO_PORT
|
||||
#define LED0_GPIO_PIN LD2_GPIO_PIN
|
||||
|
||||
#endif /* __INC_BOARD_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue