2020-03-27 10:24:01 +00:00
|
|
|
#ifndef __NRF52_DK_H__
|
|
|
|
#define __NRF52_DK_H__
|
|
|
|
|
|
|
|
#include "driver.h"
|
|
|
|
|
|
|
|
#include "gpio.h"
|
2020-03-26 05:45:43 +00:00
|
|
|
#include "spi.h"
|
2020-03-27 10:24:01 +00:00
|
|
|
|
|
|
|
// 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
|
|
|
|
};
|
|
|
|
|
2020-03-26 05:45:43 +00:00
|
|
|
// SPI 0
|
|
|
|
const struct spi nrf_spi_0 = {
|
|
|
|
.sck_pin = 2,
|
|
|
|
.mosi_pin = 3,
|
|
|
|
.miso_pin = 0xff,
|
|
|
|
.ss_pin = 25
|
|
|
|
};
|
|
|
|
const struct driver spi_0 = {
|
|
|
|
.name = "SPI0",
|
|
|
|
.fp = &spi_fp,
|
|
|
|
.dev = &nrf_spi_0
|
|
|
|
};
|
|
|
|
|
2020-03-27 10:24:01 +00:00
|
|
|
#endif
|