diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2020-07-17 15:41:13 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2020-07-17 15:41:13 +0200 |
commit | e704cc1193babd25db46055a6de436be687aba18 (patch) | |
tree | 8935e59e23aee3f80232fda964bdb96f20900c80 /include | |
parent | 583ece21a3484fa4a923cfcd2d3a66828485da40 (diff) |
Add mmsubstate driver for sub-state detection evaluation
mmsubstate is a synthetic peripheral which uses a LED to create well-defined
power sub-states in select power states.
Diffstat (limited to 'include')
-rw-r--r-- | include/driver/mmsubstate.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/driver/mmsubstate.h b/include/driver/mmsubstate.h new file mode 100644 index 0000000..3338dbc --- /dev/null +++ b/include/driver/mmsubstate.h @@ -0,0 +1,24 @@ +#ifndef MMSUBSTATE_H +#define MMSUBSTATE_H + +class MicroMoodySubstate { + private: + MicroMoodySubstate(const MicroMoodySubstate ©); + + 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 |