Merge branch 'master' of https://github.com/mrcodetastic/ESP32-HUB75-MatrixPanel-DMA
This commit is contained in:
commit
0be6f369ad
3 changed files with 13 additions and 16 deletions
.github/workflows
examples/PIO_TestPatterns
src
5
.github/workflows/esp-idf-with-gfx.yml
vendored
5
.github/workflows/esp-idf-with-gfx.yml
vendored
|
@ -12,7 +12,7 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: esp-idf 5.3.1 with Adafruit GFX
|
name: esp-idf v5.3.2 with Adafruit GFX
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
@ -39,12 +39,13 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: 'espressif/arduino-esp32'
|
repository: 'espressif/arduino-esp32'
|
||||||
|
ref: 3.1.3
|
||||||
path: 'examples/esp-idf/with-gfx/components/arduino'
|
path: 'examples/esp-idf/with-gfx/components/arduino'
|
||||||
- name: Edit Adafruit_BusIO CMakeLists.txt
|
- name: Edit Adafruit_BusIO CMakeLists.txt
|
||||||
run: sed -i 's/arduino-esp32)/arduino)/g' examples/esp-idf/with-gfx/components/Adafruit_BusIO/CMakeLists.txt
|
run: sed -i 's/arduino-esp32)/arduino)/g' examples/esp-idf/with-gfx/components/Adafruit_BusIO/CMakeLists.txt
|
||||||
- name: esp-idf build
|
- name: esp-idf build
|
||||||
uses: espressif/esp-idf-ci-action@v1
|
uses: espressif/esp-idf-ci-action@v1
|
||||||
with:
|
with:
|
||||||
esp_idf_version: v5.3.1
|
esp_idf_version: v5.3.2
|
||||||
target: esp32
|
target: esp32
|
||||||
path: 'examples/esp-idf/with-gfx'
|
path: 'examples/esp-idf/with-gfx'
|
||||||
|
|
|
@ -4,7 +4,7 @@ description = HUB75 ESP32 I2S DMA test patterns example
|
||||||
;src_dir = src
|
;src_dir = src
|
||||||
|
|
||||||
[env]
|
[env]
|
||||||
platform = espressif32
|
platform = https://github.com/pioarduino/platform-espressif32/releases/download/53.03.13/platform-espressif32.zip
|
||||||
board = wemos_d1_mini32
|
board = wemos_d1_mini32
|
||||||
lib_deps =
|
lib_deps =
|
||||||
fastled/FastLED
|
fastled/FastLED
|
||||||
|
|
|
@ -510,45 +510,41 @@ void MatrixPanel_I2S_DMA::clearFrameBuffer(bool _buff_id)
|
||||||
--row_idx;
|
--row_idx;
|
||||||
|
|
||||||
ESP32_I2S_DMA_STORAGE_TYPE *row = fb->rowBits[row_idx]->getDataPtr(0); // set pointer to the HEAD of a buffer holding data for the entire matrix row
|
ESP32_I2S_DMA_STORAGE_TYPE *row = fb->rowBits[row_idx]->getDataPtr(0); // set pointer to the HEAD of a buffer holding data for the entire matrix row
|
||||||
|
|
||||||
ESP32_I2S_DMA_STORAGE_TYPE abcde = (ESP32_I2S_DMA_STORAGE_TYPE)row_idx;
|
ESP32_I2S_DMA_STORAGE_TYPE abcde = (ESP32_I2S_DMA_STORAGE_TYPE)row_idx;
|
||||||
|
|
||||||
// get last pixel index in a row of all colourdepths
|
// get last pixel index in a row of all colourdepths
|
||||||
int x_pixel = fb->rowBits[row_idx]->width * fb->rowBits[row_idx]->colour_depth;
|
int x_pixel = fb->rowBits[row_idx]->width * fb->rowBits[row_idx]->colour_depth;
|
||||||
|
|
||||||
abcde <<= BITS_ADDR_OFFSET; // shift row y-coord to match ABCDE bits in vector from 8 to 12
|
abcde <<= BITS_ADDR_OFFSET; // shift row y-coord to match ABCDE bits in vector from 8 to 12
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
--x_pixel;
|
--x_pixel;
|
||||||
|
|
||||||
if (m_cfg.driver == HUB75_I2S_CFG::SM5266P)
|
if (m_cfg.driver == HUB75_I2S_CFG::SM5266P)
|
||||||
{
|
{
|
||||||
// modifications here for row shift register type SM5266P
|
// modifications here for row shift register type SM5266P
|
||||||
// https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-I2S-DMA/issues/164
|
// https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-I2S-DMA/issues/164
|
||||||
row[x_pixel] = abcde & (0x18 << BITS_ADDR_OFFSET); // mask out the bottom 3 bits which are the clk di bk inputs
|
row[x_pixel] = abcde & (0x18 << BITS_ADDR_OFFSET); // mask out the bottom 3 bits which are the clk di bk inputs
|
||||||
}
|
}
|
||||||
else if (m_cfg.driver == HUB75_I2S_CFG::DP3246_SM5368)
|
else if (m_cfg.driver == HUB75_I2S_CFG::DP3246_SM5368)
|
||||||
{
|
{
|
||||||
row[ESP32_TX_FIFO_POSITION_ADJUST(x_pixel)] = 0x0000;
|
row[ESP32_TX_FIFO_POSITION_ADJUST(x_pixel)] = 0x0000;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
row[ESP32_TX_FIFO_POSITION_ADJUST(x_pixel)] = abcde;
|
row[ESP32_TX_FIFO_POSITION_ADJUST(x_pixel)] = abcde;
|
||||||
}
|
}
|
||||||
|
|
||||||
} while (x_pixel != fb->rowBits[row_idx]->width); // spare the first "width's" worth of pixels as they are the LSB pixels/colordepth
|
} while (x_pixel != fb->rowBits[row_idx]->width); // spare the first "width's" worth of pixels as they are the LSB pixels/colordepth
|
||||||
|
|
||||||
// colour_index[0] (LSB) x_pixels must be "marked" with a previous's row address, 'cause it is used to display
|
// The colour_index[0] (LSB) x_pixels must be "marked" with a previous's row address, because it is used to display
|
||||||
// previous row while we pump in MSBs's for a new row
|
// previous row while we pump in MSBs's for the next row.
|
||||||
|
|
||||||
if (row_idx == 0) {
|
if (row_idx == 0) {
|
||||||
abcde = ROWS_PER_FRAME-1; // wrap around
|
abcde = ROWS_PER_FRAME-1; // wrap around
|
||||||
} else {
|
} else {
|
||||||
abcde = row_idx-1;
|
abcde = row_idx-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
abcde <<= BITS_ADDR_OFFSET; // shift row y-coord to match ABCDE bits in vector from 8 to 12
|
abcde <<= BITS_ADDR_OFFSET; // shift row y-coord to match ABCDE bits in vector from 8 to 12
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
--x_pixel;
|
--x_pixel;
|
||||||
|
|
Loading…
Add table
Reference in a new issue