narf52/include/spi.h

24 lines
466 B
C
Raw Normal View History

2020-03-28 07:45:36 +00:00
#ifndef __NRF52_SPI_H__
#define __NRF52_SPI_H__
2020-03-29 10:12:42 +00:00
int spi_open(const struct driver *drv);
int spi_close(const struct driver *drv);
int spi_write(const struct driver *drv, const char *buffer, unsigned int len);
struct spi {
unsigned int sck_pin;
unsigned int mosi_pin;
unsigned int miso_pin;
};
static const struct driver_fp spi_fp = {
.open = spi_open,
.close = spi_close,
.read = NULL,
.write = spi_write,
.ioctl = NULL
};
2020-03-28 07:45:36 +00:00
#endif