Spi dynamic speed (#432)

This commit is contained in:
Michael Miller authored and GitHub committed 2021-02-16 10:23:02 -08:00
1 parent b76a42bb5a
commit 816de24962
19 files changed
+174 -1

No files matched your search

+7
View File
@@ -37,6 +37,8 @@ License along with NeoPixel. If not, see
template<typename T_TWOWIRE> class P9813MethodBase
{
public:
typedef typename T_TWOWIRE::SettingsObject SettingsObject;
P9813MethodBase(uint8_t pinClock, uint8_t pinData, uint16_t pixelCount, size_t elementSize, size_t settingsSize) :
_sizeData(pixelCount * elementSize + settingsSize),
_sizeEndFrame((pixelCount + 15) / 16), // 16 = div 2 (bit for every two pixels) div 8 (bits to bytes)
@@ -104,6 +106,11 @@ public:
return _sizeData;
};
void applySettings(const SettingsObject& settings)
{
_wire.applySettings(settings);
}
private:
const size_t _sizeData; // Size of '_data' buffer below
const size_t _sizeEndFrame;