summaryrefslogtreecommitdiff
path: root/include/driver/mmsubstate.h
blob: 8e8b3b31f5a48ae1ad8c3faa47f2bd6ec4091551 (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 Birte Kristina Friesel
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */
#ifndef MMSUBSTATE_H
#define MMSUBSTATE_H

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

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

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

		void sleep();
		void noSubstates(unsigned char power1, unsigned char power2);
		void twoSubstates(unsigned char switchDutarion, unsigned char power);
		void fourSubstates(unsigned char switchDutarion, unsigned char power);
		void eightSubstates(unsigned char switchDutarion, unsigned char power);
		void setSubstates(unsigned char substateCount, unsigned char switchDuration, unsigned char power);
};

extern MicroMoodySubstate moody;

#endif