ESPHome  2024.10.2
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
const uint32_t flags
Definition: stm32flash.h:85
void digital_write(uint8_t pin, bool value) override
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
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