summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/driver/sharp96.h24
-rw-r--r--include/msp430fr5969lp/driver/spi.h18
-rw-r--r--include/msp430fr5969lp/driver/spi_b.h2
3 files changed, 25 insertions, 19 deletions
diff --git a/include/driver/sharp96.h b/include/driver/sharp96.h
new file mode 100644
index 0000000..cd99ad7
--- /dev/null
+++ b/include/driver/sharp96.h
@@ -0,0 +1,24 @@
+#ifndef SHARP96_H
+#define SHARP96_H
+
+class Sharp96 {
+ private:
+ Sharp96(const Sharp96 &copy);
+ unsigned char txbuf[2];
+ unsigned char vcom;
+ unsigned char swap_bits(unsigned char byte);
+
+ public:
+ Sharp96() : vcom(0) {}
+
+ void setup();
+ void powerOn();
+ void powerOff();
+ void clear();
+ void writeLine(unsigned char line_no, unsigned char* data);
+ void toggleVCOM();
+};
+
+extern Sharp96 sharp96;
+
+#endif
diff --git a/include/msp430fr5969lp/driver/spi.h b/include/msp430fr5969lp/driver/spi.h
deleted file mode 100644
index 8c593ee..0000000
--- a/include/msp430fr5969lp/driver/spi.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef SPI_H
-#define SPI_H
-
-class SPI {
- private:
- SPI(const SPI &copy);
-
- 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
index 8c593ee..4be7346 100644
--- a/include/msp430fr5969lp/driver/spi_b.h
+++ b/include/msp430fr5969lp/driver/spi_b.h
@@ -7,7 +7,7 @@ class SPI {
public:
SPI () {}
- signed char setup();
+ void setup();
signed char xmit(
unsigned char tx_len, unsigned char *tx_buf,
unsigned char rx_len, unsigned char *rx_buf);