Skip to content

Commit

Permalink
olimexino_stm32: provide button and leds for basic samples
Browse files Browse the repository at this point in the history
Provide BUT button and LED1, LED2 leds defines in order to get
basic samples "blinky" and "button" available on olimexino_stm32.
Defines have been named in order to match with board printing.
Aliases are provided to get compatibility with zephyr sample code.

Change-Id: I975dc6c043ea83935fb229cafc737cb3ed80fdc4
Signed-off-by: Yannis Damigos <[email protected]>
  • Loading branch information
ydamigos authored and Anas Nashif committed Mar 1, 2017
1 parent fce0d9a commit cd9a28b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions boards/arm/olimexino_stm32/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,22 @@

#include <soc.h>

/* USER push button BUT */
#define USER_PB_GPIO_PORT "GPIOC"
#define USER_PB_GPIO_PIN 9

/* LED1 green LED */
#define LED1_GPIO_PORT "GPIOA"
#define LED1_GPIO_PIN 5

/* LED2 yellow LED */
#define LED2_GPIO_PORT "GPIOA"
#define LED2_GPIO_PIN 1

/* Define 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 LED1_GPIO_PORT
#define LED0_GPIO_PIN LED1_GPIO_PIN

#endif /* __INC_BOARD_H */

0 comments on commit cd9a28b

Please sign in to comment.