11 #ifndef __MCP4561_HEADER
12 #define __MCP4561_HEADER
14 #include "../com/i2c.hpp"
32 enum{write = 0, incr = 1, decr = 2, read = 3};
33 enum{ volatile_wimper_0 = 0x00
34 , volatile_wimper_1 = 0x01
35 , eeprom_wimper_0 = 0x02
36 , eeprom_wimper_1 = 0x03
37 , tcon_register = 0x04
38 , status_register = 0x05
45 uint8_t
cmd(uint8_t
const & reg, uint8_t
const & _cmd)
const {
46 return (reg << 4) | (_cmd << 2);
49 operator uint8_t()
const {
69 uint8_t val = uint8_t((*
this));
78 #endif //__MCP4561_HEADER
class com::i2cout_class i2cout
MCP4561_class(uint8_t adr=46)
Definition: MCP4561.hpp:42
MCP4561_class & operator--()
Definition: MCP4561.hpp:64
void save()
Definition: MCP4561.hpp:68
uint8_t cmd(uint8_t const ®, uint8_t const &_cmd) const
Definition: MCP4561.hpp:45
MCP4561_class & operator=(uint8_t const &val)
Definition: MCP4561.hpp:55
struct ustd::endl_class endl
MCP4561_class & operator++()
Definition: MCP4561.hpp:59
Definition: MCP4561.hpp:31
class com::i2cin_class i2cin