From 044ff708d979cb5c17c1b2e0dafb6be0ccecab43 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 19 Dec 2017 14:38:41 +0100 Subject: add (untested!) MSP430 SPI driver --- include/msp430fr5969lp/driver/spi.h | 18 ++++++++++++++++++ include/msp430fr5969lp/driver/spi_b.h | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 include/msp430fr5969lp/driver/spi.h create mode 100644 include/msp430fr5969lp/driver/spi_b.h (limited to 'include/msp430fr5969lp') diff --git a/include/msp430fr5969lp/driver/spi.h b/include/msp430fr5969lp/driver/spi.h new file mode 100644 index 0000000..8c593ee --- /dev/null +++ b/include/msp430fr5969lp/driver/spi.h @@ -0,0 +1,18 @@ +#ifndef SPI_H +#define SPI_H + +class SPI { + private: + SPI(const SPI ©); + + public: + SPI () {} + signed char setup(); + signed char xmit( + unsigned char tx_len, unsigned char *tx_buf, + unsigned char rx_len, unsigned char *rx_buf); +}; + +extern SPI spi; + +#endif diff --git a/include/msp430fr5969lp/driver/spi_b.h b/include/msp430fr5969lp/driver/spi_b.h new file mode 100644 index 0000000..8c593ee --- /dev/null +++ b/include/msp430fr5969lp/driver/spi_b.h @@ -0,0 +1,18 @@ +#ifndef SPI_H +#define SPI_H + +class SPI { + private: + SPI(const SPI ©); + + public: + SPI () {} + signed char setup(); + signed char xmit( + unsigned char tx_len, unsigned char *tx_buf, + unsigned char rx_len, unsigned char *rx_buf); +}; + +extern SPI spi; + +#endif -- cgit v1.2.3