ESPHome
2026.11.0-dev
Loading...
Searching...
No Matches
esphome
components
mcp4725
mcp4725.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/components/output/float_output.h
"
4
#include "
esphome/core/component.h
"
5
#include "
esphome/components/i2c/i2c.h
"
6
7
namespace
esphome::mcp4725
{
8
9
static
constexpr
uint8_t MCP4725_ADDR = 0x60;
10
static
constexpr
uint8_t MCP4725_RES = 12;
11
12
class
MCP4725
final :
public
Component
,
public
output::FloatOutput
,
public
i2c::I2CDevice
{
13
public
:
14
void
setup
()
override
;
15
void
dump_config
()
override
;
16
void
write_state
(
float
state
)
override
;
17
18
protected
:
19
};
20
21
}
// namespace esphome::mcp4725
esphome::Component
Definition
component.h:147
esphome::i2c::I2CDevice
This Class provides the methods to read/write bytes from/to an i2c device.
Definition
i2c.h:144
esphome::mcp4725::MCP4725
Definition
mcp4725.h:12
esphome::mcp4725::MCP4725::setup
void setup() override
Definition
mcp4725.cpp:8
esphome::mcp4725::MCP4725::dump_config
void dump_config() override
Definition
mcp4725.cpp:16
esphome::mcp4725::MCP4725::write_state
void write_state(float state) override
Definition
mcp4725.cpp:19
esphome::output::FloatOutput
Base class for all output components that can output a variable level, like PWM.
Definition
float_output.h:38
component.h
state
bool state
Definition
fan.h:2
float_output.h
i2c.h
esphome::mcp4725
Definition
mcp4725.cpp:4
Generated by
1.12.0