summaryrefslogtreecommitdiff
path: root/include/driver/sharp96.h
blob: 1106df1a7d9a3d59c878ea1c332741e30e5669d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * Copyright 2020 Daniel Friesel
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */
#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