mirror of
https://github.com/esphome/esphome.git
synced 2025-03-28 21:48:16 +00:00
Update mcp4461.h
This commit is contained in:
parent
1deba54baa
commit
0787429a46
@ -7,8 +7,6 @@
|
|||||||
namespace esphome {
|
namespace esphome {
|
||||||
namespace mcp4461 {
|
namespace mcp4461 {
|
||||||
|
|
||||||
static const LogString *const LOG_PARENT_FAILED_STR = LOG_STR("Parent MCP4461 component has failed! Aborting");
|
|
||||||
|
|
||||||
struct WiperState {
|
struct WiperState {
|
||||||
bool terminal_a = true;
|
bool terminal_a = true;
|
||||||
bool terminal_b = true;
|
bool terminal_b = true;
|
||||||
@ -55,6 +53,15 @@ enum class Mcp4461EepromLocation : uint8_t {
|
|||||||
|
|
||||||
enum class Mcp4461TerminalIdx : uint8_t { MCP4461_TERMINAL_0 = 0, MCP4461_TERMINAL_1 = 1 };
|
enum class Mcp4461TerminalIdx : uint8_t { MCP4461_TERMINAL_0 = 0, MCP4461_TERMINAL_1 = 1 };
|
||||||
|
|
||||||
|
enum ErrorCode {
|
||||||
|
MCP4461_STATUS_OK = 0, // CMD completed successfully
|
||||||
|
MCP4461_STATUS_REGISTER_INVALID, // Status register value was invalid
|
||||||
|
MCP4461_VALUE_INVALID, // Invalid value given for wiper / eeprom
|
||||||
|
MCP4461_STATUS_WRITE_PROTECTED, // The value was read, but the CRC over the payload (valid and data) does not match
|
||||||
|
MCP4461_STATUS_WIPER_LOCKED, // The wiper is locked using WiperLock-technology - all actions for this wiper will be aborted/discarded
|
||||||
|
} error_code_{MCP4461_STATUS_OK};
|
||||||
|
|
||||||
|
|
||||||
class Mcp4461Wiper;
|
class Mcp4461Wiper;
|
||||||
|
|
||||||
// Mcp4461Component
|
// Mcp4461Component
|
||||||
|
Loading…
x
Reference in New Issue
Block a user