ESPHome
2026.8.0-dev
Loading...
Searching...
No Matches
esphome
components
waveshare_io_ch32v003
output
waveshare_io_ch32v003_output.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
../waveshare_io_ch32v003.h
"
4
#include "
esphome/components/output/float_output.h
"
5
6
namespace
esphome::waveshare_io_ch32v003
{
7
8
class
WaveshareIOCH32V003Output
:
public
output::FloatOutput
,
public
Parented
<WaveshareIOCH32V003Component> {
9
public
:
10
void
set_pwm_safe_range
(uint8_t min_value, uint8_t max_value) {
11
this->
pwm_min_value_
= min_value;
12
this->
pwm_max_value_
= max_value;
13
}
14
15
protected
:
16
void
write_state
(
float
state
)
override
;
17
18
uint8_t
pwm_min_value_
{1};
19
uint8_t
pwm_max_value_
{247};
20
};
21
22
}
// namespace esphome::waveshare_io_ch32v003
esphome::Parented
Helper class to easily give an object a parent of type T.
Definition
helpers.h:1875
esphome::output::FloatOutput
Base class for all output components that can output a variable level, like PWM.
Definition
float_output.h:38
esphome::waveshare_io_ch32v003::WaveshareIOCH32V003Output
Definition
waveshare_io_ch32v003_output.h:8
esphome::waveshare_io_ch32v003::WaveshareIOCH32V003Output::pwm_min_value_
uint8_t pwm_min_value_
Definition
waveshare_io_ch32v003_output.h:18
esphome::waveshare_io_ch32v003::WaveshareIOCH32V003Output::pwm_max_value_
uint8_t pwm_max_value_
Definition
waveshare_io_ch32v003_output.h:19
esphome::waveshare_io_ch32v003::WaveshareIOCH32V003Output::write_state
void write_state(float state) override
Definition
waveshare_io_ch32v003_output.cpp:9
esphome::waveshare_io_ch32v003::WaveshareIOCH32V003Output::set_pwm_safe_range
void set_pwm_safe_range(uint8_t min_value, uint8_t max_value)
Definition
waveshare_io_ch32v003_output.h:10
state
bool state
Definition
fan.h:2
float_output.h
esphome::waveshare_io_ch32v003
Definition
waveshare_io_ch32v003_output.cpp:5
waveshare_io_ch32v003.h
Generated by
1.12.0