Skip to content

Commit

Permalink
Update ESP32-HUB75-MatrixPanel-leddrivers_v2.cpp
Browse files Browse the repository at this point in the history
fix for show\hide panel
  • Loading branch information
LAutour authored Oct 6, 2022
1 parent 0f61e06 commit 43d7971
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ESP32-HUB75-MatrixPanel-leddrivers_v2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ int icn2053setOEaddrBuffer(ESP32_I2S_DMA_STORAGE_TYPE* buffer, int offset, uint8
}

//установка заголовка кадра в буфере
int icn2053setVSyncBuffer(ESP32_I2S_DMA_STORAGE_TYPE* vsync_buffer, int offset, bool leds_enable)
int icn2053setVSyncBuffer(ESP32_I2S_DMA_STORAGE_TYPE* vsync_buffer, int offset, bool leds_enable, bool vsync)
{
//if (vsync_buffer == NULL) return;
offset = data_clr(vsync_buffer, offset, BIT_LAT, ICN2053_CMD_DELAY);
Expand All @@ -192,17 +192,20 @@ int icn2053setVSyncBuffer(ESP32_I2S_DMA_STORAGE_TYPE* vsync_buffer, int offset,
offset = data_set(vsync_buffer, offset, BIT_LAT, ICN2053_DIS_OP);
}
offset = data_clr(vsync_buffer, offset, BIT_LAT, n);
offset = data_set(vsync_buffer, offset, BIT_LAT, ICN2053_V_SYNC);
if (leds_enable)
offset = data_set(vsync_buffer, offset, BIT_LAT, ICN2053_V_SYNC);
else
offset = data_clr(vsync_buffer, offset, BIT_LAT, ICN2053_V_SYNC);
offset = data_clr(vsync_buffer, offset, BIT_LAT, ICN2053_CMD_DELAY);
offset = data_set(vsync_buffer, offset, BIT_LAT, ICN2053_PRE_ACT);
offset = data_clr(vsync_buffer, offset, BIT_LAT, ICN2053_CMD_DELAY);
return offset;
}

//установка заголовка кадра
void MatrixPanel_I2S_DMA::icn2053setVSync(bool leds_enable)
void MatrixPanel_I2S_DMA::icn2053setVSync(bool leds_enable, bool vsync)
{
icn2053setVSyncBuffer(dma_buff.rowBits[offset_prefix], FRAME_ADD_LEN, leds_enable);
icn2053setVSyncBuffer(dma_buff.rowBits[offset_prefix], FRAME_ADD_LEN, leds_enable, vsync);
}

//установка значений конфигурационных регистров
Expand Down

0 comments on commit 43d7971

Please sign in to comment.