Add nrf spi driver

This commit is contained in:
Thomas Klaehn
2020-03-29 12:12:42 +02:00
parent 3729c0e2c0
commit 437ba90bc2
4 changed files with 102 additions and 84 deletions

View File

@@ -4,6 +4,7 @@
#include "driver.h"
#include "gpio.h"
#include "spi.h"
// LED 1
const struct gpio nrf_led_1 = {
@@ -49,4 +50,15 @@ const struct driver led_4 = {
.dev = &nrf_led_4
};
const struct spi nrf_spi_0 = {
.sck_pin = 2,
.mosi_pin = 3,
.miso_pin = 4
};
const struct driver spi_0 = {
.name = "SPI0",
.fp = &spi_fp,
.dev = &nrf_spi_0
};
#endif