| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | /* | ||
| 3 | * This file is part of the Falcon Player (FPP) and is Copyright (C) | ||
| 4 | * 2013-2022 by the Falcon Player Developers. | ||
| 5 | * | ||
| 6 | * The Falcon Player (FPP) is free software, and is covered under | ||
| 7 | * multiple Open Source licenses. Please see the included 'LICENSES' | ||
| 8 | * file for descriptions of what files are covered by each license. | ||
| 9 | * | ||
| 10 | * This source file is covered under the GPL v2 as described in the | ||
| 11 | * included LICENSE.GPL file. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include "ChannelOutput.h" | ||
| 15 | #include "fpp-json-fwd.h" | ||
| 16 | #include "util/GPIOUtils.h" | ||
| 17 | |||
| 18 | class GPIOOutput : public ChannelOutput { | ||
| 19 | public: | ||
| 20 | GPIOOutput(unsigned int startChannel, unsigned int channelCount); | ||
| 21 | ~GPIOOutput(); | ||
| 22 | |||
| 23 | virtual int Init(Json::Value config) override; | ||
| 24 | virtual int Close(void) override; | ||
| 25 | |||
| 26 | virtual int SendData(unsigned char* channelData) override; | ||
| 27 | |||
| 28 | virtual void DumpConfig(void) override; | ||
| 29 | |||
| 30 | 8 | virtual void GetRequiredChannelRanges(const std::function<void(int, int)>& addRange) override { | |
| 31 | 8 | addRange(m_startChannel, m_startChannel); | |
| 32 | 8 | } | |
| 33 | |||
| 34 | private: | ||
| 35 | const PinCapabilities* m_GPIOPin; | ||
| 36 | int m_invertOutput; | ||
| 37 | int m_pwm; | ||
| 38 | std::string lastWarning; | ||
| 39 | uint64_t lastWarningMS = 0; | ||
| 40 | }; | ||
| 41 |