From f8166ed9901e6133b626413c6b66c8e931c35b0c Mon Sep 17 00:00:00 2001 From: Thomas Klaehn Date: Fri, 27 Mar 2020 11:24:01 +0100 Subject: [PATCH] Add board file for nrf52-dk --- include/board.h | 8 +++++ include/platform/nrf52/nrf52-dk.h | 52 +++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 include/board.h create mode 100644 include/platform/nrf52/nrf52-dk.h diff --git a/include/board.h b/include/board.h new file mode 100644 index 0000000..462b778 --- /dev/null +++ b/include/board.h @@ -0,0 +1,8 @@ +#ifndef __BOARD_H__ +#define __BOARD_H__ + +#if defined(BOARD_PCA10040) + #include "platform/nrf52/nrf52-dk.h" +#endif + +#endif diff --git a/include/platform/nrf52/nrf52-dk.h b/include/platform/nrf52/nrf52-dk.h new file mode 100644 index 0000000..473651c --- /dev/null +++ b/include/platform/nrf52/nrf52-dk.h @@ -0,0 +1,52 @@ +#ifndef __NRF52_DK_H__ +#define __NRF52_DK_H__ + +#include "driver.h" + +#include "gpio.h" + +// LED 1 +const struct gpio nrf_led_1 = { + .pin = 17, + .dir = OUT +}; +const struct driver led_1 = { + .name = "LED1", + .fp = &gpio_fp, + .dev = &nrf_led_1 +}; + +// LED 2 +const struct gpio nrf_led_2 = { + .pin = 18, + .dir = OUT +}; +const struct driver led_2 = { + .name = "LED2", + .fp = &gpio_fp, + .dev = &nrf_led_2 +}; + +// LED 3 +const struct gpio nrf_led_3 = { + .pin = 19, + .dir = OUT +}; +const struct driver led_3 = { + .name = "LED3", + .fp = &gpio_fp, + .dev = &nrf_led_3 +}; + +// LED 4 +const struct gpio nrf_led_4 = { + .pin = 20, + .dir = OUT +}; +const struct driver led_4 = { + .name = "LED4", + .fp = &gpio_fp, + .dev = &nrf_led_4 +}; + +#endif