esphome/esphome/components/mcp23017/mcp23017.h
Jesse Hills 570ec36fe3
MCP23XXX Refactor (#1560)
* Refactor MCP23XXX classes to consolidate shared code

* Update test mcp23xxx pin schemas
2021-03-07 16:23:54 -03:00

24 lines
569 B
C++

#pragma once
#include "esphome/core/component.h"
#include "esphome/components/mcp23x17_base/mcp23x17_base.h"
#include "esphome/core/esphal.h"
#include "esphome/components/i2c/i2c.h"
namespace esphome {
namespace mcp23017 {
class MCP23017 : public mcp23x17_base::MCP23X17Base, public i2c::I2CDevice {
public:
MCP23017() = default;
void setup() override;
void dump_config() override;
protected:
bool read_reg(uint8_t reg, uint8_t *value) override;
bool write_reg(uint8_t reg, uint8_t value) override;
};
} // namespace mcp23017
} // namespace esphome