forked from Makuna/NeoPixelBus
ESP32 Hardware SPI Improvements - Options for using both SPI peripherals, and DMA (#441)
* Fix header file comment * Add TwoWireHspiImpl and Example * Add start of TwoWireEsp32DmaSpiImple (Currently just able to use HSPI and VSPI in parallel, no DMA) * Update names for TwoWireEsp32DmaSpi and set set spi_bus using template not constructor * Update example with new functionality and bugfixes * DotStarEsp32DmaSpiMethod - * Add 5MHz option to all SPI-based classes * DotStarGenericMethod - Give option to use Vspi alias of Spi class if wanting to specify which SPI peripheral is used on the ESP32 - Add missing DotStarHspiHzMethod * TwoWireHspiImple - bring up to date with applySettings() method * DotStarTest_Esp32Advanced example - update to show how to change clock speed at runtime - Remove commented out pins cluttering up example * DotStarTest_Esp32DmaSpi example - Co-authored-by: Louis Beaudoin <louis@embedded-creations.com>
This commit is contained in:
1 parent
cc17ec6fa1
commit
b90992fdc2
11 files changed
+783
-3
No files matched your search
@@ -134,14 +134,37 @@ typedef DotStarMethodBase<TwoWireBitBangImple> DotStarMethod;
|
||||
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed40Mhz>> DotStarSpi40MhzMethod;
|
||||
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed20Mhz>> DotStarSpi20MhzMethod;
|
||||
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed10Mhz>> DotStarSpi10MhzMethod;
|
||||
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed5Mhz>> DotStarSpi5MhzMethod;
|
||||
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed2Mhz>> DotStarSpi2MhzMethod;
|
||||
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed1Mhz>> DotStarSpi1MhzMethod;
|
||||
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed500Khz>> DotStarSpi500KhzMethod;
|
||||
|
||||
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeedHz>> DotStarSpiHzMethod;
|
||||
|
||||
typedef DotStarSpi10MhzMethod DotStarSpiMethod;
|
||||
#endif
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
// Give option to use Vspi alias of Spi class if wanting to specify which SPI peripheral is used on the ESP32
|
||||
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed40Mhz>> DotStarVspi40MhzMethod;
|
||||
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed20Mhz>> DotStarVspi20MhzMethod;
|
||||
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed10Mhz>> DotStarVspi10MhzMethod;
|
||||
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed5Mhz>> DotStarVspi5MhzMethod;
|
||||
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed2Mhz>> DotStarVspi2MhzMethod;
|
||||
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed1Mhz>> DotStarVspi1MhzMethod;
|
||||
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed500Khz>> DotStarVspi500KhzMethod;
|
||||
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeedHz>> DotStarVspiHzMethod;
|
||||
|
||||
typedef DotStarSpi10MhzMethod DotStarVspiMethod;
|
||||
|
||||
#include "TwoWireHspiImple.h"
|
||||
typedef DotStarMethodBase<TwoWireHspiImple<SpiSpeed40Mhz>> DotStarHspi40MhzMethod;
|
||||
typedef DotStarMethodBase<TwoWireHspiImple<SpiSpeed20Mhz>> DotStarHspi20MhzMethod;
|
||||
typedef DotStarMethodBase<TwoWireHspiImple<SpiSpeed10Mhz>> DotStarHspi10MhzMethod;
|
||||
typedef DotStarMethodBase<TwoWireHspiImple<SpiSpeed5Mhz>> DotStarHspi5MhzMethod;
|
||||
typedef DotStarMethodBase<TwoWireHspiImple<SpiSpeed2Mhz>> DotStarHspi2MhzMethod;
|
||||
typedef DotStarMethodBase<TwoWireHspiImple<SpiSpeed1Mhz>> DotStarHspi1MhzMethod;
|
||||
typedef DotStarMethodBase<TwoWireHspiImple<SpiSpeed500Khz>> DotStarHspi500KhzMethod;
|
||||
typedef DotStarMethodBase<TwoWireHspiImple<SpiSpeedHz>> DotStarHspiHzMethod;
|
||||
|
||||
typedef DotStarHspi10MhzMethod DotStarHspiMethod;
|
||||
#endif
|
||||
Reference in new issue
Block a user