LightHub 4.6.0
Open-source smart home controller firmware
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
32class out_pwm : public colorChannel {
33public:
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
colorChannel()
Default constructor.
Definition colorchannel.h:27
Command + value container passed between items, drivers and MQTT.
Definition itemCmd.h:306
Hardware PWM output driver (config channel type CH_PWM = 3).
Definition out_pwm.h:32
int Setup() override
Configure pin directions and (on Mega2560) the 4000 Hz PWM timers.
Definition out_pwm.cpp:19
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
int Stop() override
Release the pins back to INPUT and mark the driver uninitialized.
Definition out_pwm.cpp:61
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
Item (virtual channel) system of LightHub.