Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For Review Only #861

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/internal/methods/11StepDMXEncoding.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/internal/methods/EndianDependantByteOrder.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 14 additions & 16 deletions src/internal/methods/NeoBits.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ NeoPixel library helper functions for Methods.
Written by Michael C. Miller.

I invest time and resources providing this open source code,
please support me by donating (see https://github.com/Makuna/NeoPixelBus)
please support me by dontating (see https://github.com/Makuna/NeoPixelBus)

-------------------------------------------------------------------------
This file is part of the Makuna/NeoPixelBus library.
Expand All @@ -25,73 +25,71 @@ License along with NeoPixel. If not, see
<http://www.gnu.org/licenses/>.
-------------------------------------------------------------------------*/

class NeoBitsSpeedBase
// --------------------------------------------------------
class NeoBitsSpeedDmx512
{
public:
static uint16_t ByteSendTimeUs(uint16_t bitSendTimeNs)
{
return (bitSendTimeNs * 8) / 1000;
}
const static uint16_t BitSendTimeNs = 4000; //5500; // 4us, 250Kbps so 4000 * 11 / 8
const static uint16_t ResetTimeUs = 500; // 6 x 32us equals 3 Words.
};

// --------------------------------------------------------
class NeoBitsSpeedWs2812x : public NeoBitsSpeedBase
class NeoBitsSpeedWs2812x
{
public:
const static uint16_t BitSendTimeNs = 1250;
const static uint16_t ResetTimeUs = 300;
};

class NeoBitsSpeedWs2805 : public NeoBitsSpeedBase
class NeoBitsSpeedWs2805
{
public:
const static uint16_t BitSendTimeNs = 1125;
const static uint16_t ResetTimeUs = 300; // spec is 280, intentionally longer for compatiblity use
};

class NeoBitsSpeedSk6812 : public NeoBitsSpeedBase
class NeoBitsSpeedSk6812
{
public:
const static uint16_t BitSendTimeNs = 1250;
const static uint16_t ResetTimeUs = 80;
};

class NeoBitsSpeedTm1814 : public NeoBitsSpeedBase
class NeoBitsSpeedTm1814
{
public:
const static uint16_t BitSendTimeNs = 1250;
const static uint16_t ResetTimeUs = 200;
};

class NeoBitsSpeedTm1914 : public NeoBitsSpeedBase
class NeoBitsSpeedTm1914
{
public:
const static uint16_t BitSendTimeNs = 1250;
const static uint16_t ResetTimeUs = 200;
};

class NeoBitsSpeedTm1829 : public NeoBitsSpeedBase
class NeoBitsSpeedTm1829
{
public:
const static uint16_t BitSendTimeNs = 1250;
const static uint16_t ResetTimeUs = 200;
};

class NeoBitsSpeed800Kbps : public NeoBitsSpeedBase
class NeoBitsSpeed800Kbps
{
public:
const static uint16_t BitSendTimeNs = 1250;
const static uint16_t ResetTimeUs = 50;
};

class NeoBitsSpeed400Kbps : public NeoBitsSpeedBase
class NeoBitsSpeed400Kbps
{
public:
const static uint16_t BitSendTimeNs = 2500;
const static uint16_t ResetTimeUs = 50;
};

class NeoBitsSpeedApa106 : public NeoBitsSpeedBase
class NeoBitsSpeedApa106
{
public:
const static uint16_t BitSendTimeNs = 1710;
Expand Down
Loading