Change DMA to I2S0
For ESP32-S2 compatability.
This commit is contained in:
parent
11eaf34d91
commit
1d32228a5b
3 changed files with 6 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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); }
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue