Skip to content

Commit

Permalink
Align SPI buffer for HyperSPI to 4 bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
awawa-dev committed Jan 21, 2023
1 parent 238af82 commit f5dabe1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions esp32/HyperSPI_esp32_Neopixel/HyperSPI_esp32_Neopixel.ino
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ int serialSpeed = 115200; // serial port speed, only for monitoring as it's SPI
ESP32DMASPI::Slave slave;

static const uint32_t REAL_BUFFER = 1536;
static const uint32_t BUFFER_SIZE = REAL_BUFFER + 5;
static const uint32_t BUFFER_SIZE = REAL_BUFFER + 8;

uint8_t *spi_slave_tx_buf;
uint8_t *spi_slave_rx_buf;
Expand All @@ -49,15 +49,15 @@ int pixelCount = 0; // This is dynamic, don't change it
#define LED_TYPE NeoGrbFeature
#endif

NeoPixelBus<LED_TYPE, NeoEsp32Rmt0800KbpsMethod> *strip = NULL;
NeoPixelBus<LED_TYPE, NeoEsp32Rmt0Ws2812xMethod> *strip = NULL;

void Init(int count)
{
if (strip != NULL)
delete strip;

pixelCount = count;
strip = new NeoPixelBus<LED_TYPE, NeoEsp32Rmt0800KbpsMethod>(pixelCount, DATA_PIN);
strip = new NeoPixelBus<LED_TYPE, NeoEsp32Rmt0Ws2812xMethod>(pixelCount, DATA_PIN);
strip->Begin();
}

Expand Down
2 changes: 1 addition & 1 deletion esp32/HyperSPI_esp32_SPI_leds/HyperSPI_esp32_SPI_leds.ino
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ int serialSpeed = 115200; // serial port speed, only for monitoring as it
ESP32DMASPI::Slave slave;

static const uint32_t REAL_BUFFER = 1536;
static const uint32_t BUFFER_SIZE = REAL_BUFFER + 5;
static const uint32_t BUFFER_SIZE = REAL_BUFFER + 8;

uint8_t* spi_slave_tx_buf;
uint8_t* spi_slave_rx_buf;
Expand Down

0 comments on commit f5dabe1

Please sign in to comment.