LightHub
4.6.0
Open-source smart home controller firmware
Toggle main menu visibility
Loading...
Searching...
No Matches
out_pwm.h
Go to the documentation of this file.
1
2
#pragma once
3
#include "
options.h
"
4
#ifndef PWM_DISABLE
5
6
#include <
abstractout.h
>
7
#include <
item.h
>
8
#include "
colorchannel.h
"
9
32
class
out_pwm
:
public
colorChannel
{
33
public
:
34
35
// out_pwm():numChannels(0){};
37
int
Setup
()
override
;
39
int
Stop
()
override
;
40
41
43
int
getChanType
()
override
;
44
//int Ctrl(itemCmd cmd, char* subItem=NULL) override;
46
int
PixelCtrl
(
itemCmd
cmd,
char
* subItem=NULL,
bool
show=
true
,
bool
authorized =
false
)
override
;
47
48
//protected:
49
// short numChannels;
50
};
51
#endif
abstractout.h
colorChannel::colorChannel
colorChannel()
Default constructor.
Definition
colorchannel.h:27
itemCmd
Command + value container passed between items, drivers and MQTT.
Definition
itemCmd.h:306
out_pwm
Hardware PWM output driver (config channel type CH_PWM = 3).
Definition
out_pwm.h:32
out_pwm::Setup
int Setup() override
Configure pin directions and (on Mega2560) the 4000 Hz PWM timers.
Definition
out_pwm.cpp:19
out_pwm::getChanType
int getChanType() override
Channel type derived from the number of configured pins (RGB/RGBW/RGBWW) or the raw item type.
Definition
out_pwm.cpp:82
out_pwm::Stop
int Stop() override
Release the pins back to INPUT and mark the driver uninitialized.
Definition
out_pwm.cpp:61
out_pwm::PixelCtrl
int PixelCtrl(itemCmd cmd, char *subItem=NULL, bool show=true, bool authorized=false) override
Apply the command to the PWM pins (single percent or R/G/B/(W) values).
Definition
out_pwm.cpp:109
colorchannel.h
item.h
Item (virtual channel) system of LightHub.
options.h
lighthub
modules
out_pwm.h
Generated by
1.18.0