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

Sm5266 p #168

Merged
merged 7 commits into from
Aug 17, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Change DMA to I2S0
For ESP32-S2 compatability.
  • Loading branch information
mrcodetastic committed Aug 16, 2021
commit 1d32228a5b6e53400f336b6ea36934e28295b72f
6 changes: 3 additions & 3 deletions ESP32-HUB75-MatrixPanel-I2S-DMA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,14 +415,14 @@ void MatrixPanel_I2S_DMA::configureDMA(const HUB75_I2S_CFG& _cfg)
};

// Setup I2S
i2s_parallel_driver_install(I2S_NUM_1, &cfg);
i2s_parallel_driver_install(I2S_NUM_0, &cfg);
//i2s_parallel_setup_without_malloc(&I2S1, &cfg);

// Start DMA Output
i2s_parallel_send_dma(I2S_NUM_1, &dmadesc_a[0]);
i2s_parallel_send_dma(I2S_NUM_0, &dmadesc_a[0]);

#if SERIAL_DEBUG
Serial.println(F("configureDMA(): DMA setup completed on I2S1."));
Serial.println(F("configureDMA(): DMA setup completed on I2S_NUM_0."));
#endif

} // end initMatrixDMABuff
Expand Down
4 changes: 2 additions & 2 deletions ESP32-HUB75-MatrixPanel-I2S-DMA.h
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ class MatrixPanel_I2S_DMA {
Serial.printf_P(PSTR("Showtime for buffer: %d\n"), back_buffer_id);
#endif

i2s_parallel_flip_to_buffer(I2S_NUM_1, back_buffer_id);
i2s_parallel_flip_to_buffer(I2S_NUM_0, back_buffer_id);

// Wait before we allow any writing to the buffer. Stop flicker.
while(!i2s_parallel_is_previous_buffer_free()) { delay(1); }
Expand Down Expand Up @@ -559,7 +559,7 @@ class MatrixPanel_I2S_DMA {
*/
void stopDMAoutput() {
resetbuffers();
i2s_parallel_stop_dma(I2S_NUM_1);
i2s_parallel_stop_dma(I2S_NUM_0);
}


Expand Down
3 changes: 1 addition & 2 deletions examples/1_SimpleTestShapes/1_SimpleTestShapes.ino
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ void drawText(int colorWheelOffset)

void setup() {

//

// Module configuration
HUB75_I2S_CFG mxconfig(
PANEL_RES_X, // module width
PANEL_RES_Y, // module height
Expand Down