ESPHome
2025.2.2
Main Page
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
y
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
d
e
f
i
j
l
m
n
p
q
r
s
t
u
v
+
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
+
Enumerator
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
c
d
o
p
s
t
v
w
+
Enumerations
b
c
e
f
i
m
n
p
r
s
t
v
+
Enumerator
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
Related Functions
+
Files
File List
+
Globals
+
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
+
Functions
_
a
l
m
o
s
t
u
+
Variables
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
Typedefs
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Modules
Pages
esphome
esphome
components
mcp3204
mcp3204.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/component.h
"
4
#include "
esphome/core/hal.h
"
5
#include "
esphome/components/spi/spi.h
"
6
7
namespace
esphome
{
8
namespace
mcp3204 {
9
10
class
MCP3204
:
public
Component
,
11
public
spi::SPIDevice
<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW, spi::CLOCK_PHASE_LEADING,
12
spi::DATA_RATE_1MHZ> {
13
public
:
14
MCP3204
() =
default
;
15
16
void
set_reference_voltage
(
float
reference_voltage) { this->
reference_voltage_
= reference_voltage; }
17
18
void
setup
()
override
;
19
void
dump_config
()
override
;
20
float
get_setup_priority
()
const override
;
21
float
read_data
(uint8_t pin);
22
23
protected
:
24
float
reference_voltage_
;
25
};
26
27
}
// namespace mcp3204
28
}
// namespace esphome
esphome::mcp3204::MCP3204
Definition:
mcp3204.h:10
esphome::mcp3204::MCP3204::read_data
float read_data(uint8_t pin)
Definition:
mcp3204.cpp:22
esphome::mcp3204::MCP3204::set_reference_voltage
void set_reference_voltage(float reference_voltage)
Definition:
mcp3204.h:16
esphome::mcp3204::MCP3204::dump_config
void dump_config() override
Definition:
mcp3204.cpp:16
esphome::mcp3204::MCP3204::get_setup_priority
float get_setup_priority() const override
Definition:
mcp3204.cpp:9
esphome::mcp3204::MCP3204::reference_voltage_
float reference_voltage_
Definition:
mcp3204.h:24
hal.h
esphome::Component
Definition:
component.h:68
esphome::mcp3204::MCP3204::MCP3204
MCP3204()=default
spi.h
esphome::spi::SPIDevice
The SPIDevice is what components using the SPI will create.
Definition:
spi.h:410
esphome::mcp3204::MCP3204::setup
void setup() override
Definition:
mcp3204.cpp:11
esphome
Implementation of SPI Controller mode.
Definition:
a01nyub.cpp:7
component.h
Generated by
1.8.13