Skip to content

Commit

Permalink
Fix esp-idf v5.3 compilation error with esp32p4
Browse files Browse the repository at this point in the history
  • Loading branch information
tobozo authored Jul 26, 2024
1 parent bc744ba commit 25d9a0f
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions src/lgfx/v1/platforms/esp32/Bus_SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,21 @@ Original Source:
#elif __has_include(<soc/axi_dma_struct.h>) // ESP32P4
#include <soc/axi_dma_struct.h>
#endif
#if !defined DMA_OUT_LINK_CH0_REG
#define DMA_OUT_LINK_CH0_REG GDMA_OUT_LINK_CH0_REG
#define DMA_OUTFIFO_STATUS_CH0_REG GDMA_OUTFIFO_STATUS_CH0_REG
#define DMA_OUTLINK_START_CH0 GDMA_OUTLINK_START_CH0
#if defined (GDMA_OUTFIFO_EMPTY_L3_CH0)
#define DMA_OUTFIFO_EMPTY_CH0 GDMA_OUTFIFO_EMPTY_L3_CH0
#else
#define DMA_OUTFIFO_EMPTY_CH0 GDMA_OUTFIFO_EMPTY_CH0
#if defined ( CONFIG_IDF_TARGET_ESP32P4 )
#define DMA_OUT_LINK_CH0_REG AXI_DMA_OUT_LINK1_CH0_REG
#define DMA_OUTFIFO_STATUS_CH0_REG AXI_DMA_OUTFIFO_STATUS_CH0_REG
#define DMA_OUTLINK_START_CH0 AXI_DMA_OUTLINK_START_CH0
#define DMA_OUTFIFO_EMPTY_CH0 AXI_DMA_OUTFIFO_L3_EMPTY_CH0
#else
#if !defined DMA_OUT_LINK_CH0_REG
#define DMA_OUT_LINK_CH0_REG GDMA_OUT_LINK_CH0_REG
#define DMA_OUTFIFO_STATUS_CH0_REG GDMA_OUTFIFO_STATUS_CH0_REG
#define DMA_OUTLINK_START_CH0 GDMA_OUTLINK_START_CH0
#if defined (GDMA_OUTFIFO_EMPTY_L3_CH0)
#define DMA_OUTFIFO_EMPTY_CH0 GDMA_OUTFIFO_EMPTY_L3_CH0
#else
#define DMA_OUTFIFO_EMPTY_CH0 GDMA_OUTFIFO_EMPTY_CH0
#endif
#endif
#endif
#endif
Expand Down

0 comments on commit 25d9a0f

Please sign in to comment.