ESPHome  2022.1.1
mcp23x08_base.h
Go to the documentation of this file.
1 #pragma once
2 
5 #include "esphome/core/hal.h"
6 
7 namespace esphome {
8 namespace mcp23x08_base {
9 
11  // A side
13  MCP23X08_IPOL = 0x01,
18  MCP23X08_GPPU = 0x06,
19  MCP23X08_INTF = 0x07,
21  MCP23X08_GPIO = 0x09,
22  MCP23X08_OLAT = 0x0A,
23 };
24 
26  public:
27  bool digital_read(uint8_t pin) override;
28  void digital_write(uint8_t pin, bool value) override;
29  void pin_mode(uint8_t pin, gpio::Flags flags) override;
30  void pin_interrupt_mode(uint8_t pin, mcp23xxx_base::MCP23XXXInterruptMode interrupt_mode) override;
31 
32  protected:
33  void update_reg(uint8_t pin, bool pin_value, uint8_t reg_a) override;
34 
35  uint8_t olat_{0x00};
36 };
37 
38 } // namespace mcp23x08_base
39 } // namespace esphome
void pin_mode(uint8_t pin, gpio::Flags flags) override
bool digital_read(uint8_t pin) override
void digital_write(uint8_t pin, bool value) override
Library based on https://github.com/miguelbalboa/rfid and adapted to ESPHome by . ...
Definition: a4988.cpp:4
void update_reg(uint8_t pin, bool pin_value, uint8_t reg_a) override
void pin_interrupt_mode(uint8_t pin, mcp23xxx_base::MCP23XXXInterruptMode interrupt_mode) override