summaryrefslogtreecommitdiff
path: root/include/driver/mmsimple.h
blob: 42b0f5d6616e93f9769691e30268fae73ec0029c (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
30
31
32
33
34
#ifndef MMSIMPLE_H
#define MMSIMPLE_H

class MicroMoodySimple {
	private:
		MicroMoodySimple(const MicroMoodySimple &copy);

		unsigned char const address;
		unsigned char txbuf[3];

		void sendCmd(unsigned char byte);

	public:
		MicroMoodySimple(unsigned char const addr) : address(addr) {}

		void off();
		void red();
		void redOn();
		void redOff();
		void green();
		void greenOn();
		void greenOff();
		void blue();
		void blueOn();
		void blueOff();
		void toggleRed();
		void toggleGreen();
		void toggleBlue();
		void setBrightness(unsigned char red, unsigned char green);
};

extern MicroMoodySimple moody;

#endif