diff options
author | Daniel Friesel <derf@finalrewind.org> | 2018-01-11 14:23:07 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2018-01-11 14:23:07 +0100 |
commit | 0d84f5e512c4148bc45dd26eea177e09c0a21b56 (patch) | |
tree | 8d8ae62a68f11482d1c25f32d86cf1c43246f61d /include/driver | |
parent | 1978e406b816d463dc7feab083ce30638e8b787a (diff) |
Add Sharp96 display driver, split up msp430 SPI into a1 / b
Diffstat (limited to 'include/driver')
-rw-r--r-- | include/driver/sharp96.h | 24 |
1 files changed, 24 insertions, 0 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 ©); + 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 |