Skip to content

Commit da8861b

Browse files
committed
Updated ESP32C5 macros for esp-idf
1 parent 208f59d commit da8861b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/FastEPD.inl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
//===========================================================================
1616
//
1717
#include "FastEPD.h"
18-
#ifdef ARDUINO_ESP32C5_DEV
18+
#ifdef CONFIG_IDF_TARGET_ESP32C5
1919
#include "driver/parlio_tx.h"
2020
#else
2121
#include <esp_lcd_panel_io.h>
@@ -208,7 +208,7 @@ const BBPANELDEF panelDefs[] = {
208208
// width, height, bus_speed, flags, data[8], bus_width, ioPWR, ioSPV, ioCKV, ioSPH, ioOE, ioLE,
209209
// ioCL, ioPWR_Good, ioSDA, ioSCL, ioShiftSTR/Wakeup, ioShiftMask/vcom, ioDCDummy, graymatrix, sizeof(graymatrix), iLinePadding
210210
{1280, 720, 40000000, BB_PANEL_FLAG_MIRROR_Y, {8,23,10,9,24,25,26,27}, 8, 26, 0, 5, 4, 0, 2,
211-
3, 0, 7, 6, 0, 0, 0, u8GrayMatrix, sizeof(u8GrayMatrix), 16, -1600}, // BB_PANEL_SENSORIA_C5
211+
3, 0, 7, 6, 0, 0, 0, u8Ink5V2Matrix, sizeof(u8Ink5V2Matrix), 16, -1600}, // BB_PANEL_SENSORIA_C5
212212
};
213213
//
214214
// Forward references for panel callback functions
@@ -277,7 +277,7 @@ static uint8_t u8Cache[1024]; // used also for masking a row of 2-bit codes, nee
277277
static gpio_num_t u8CKV, u8SPH;
278278
static uint8_t bSlowSPH = 0;
279279

280-
#ifdef ARDUINO_ESP32C5_DEV
280+
#ifdef CONFIG_IDF_TARGET_ESP32C5
281281
parlio_tx_unit_config_t parlio_tx_config;
282282
parlio_tx_unit_handle_t parlio_tx_handle;
283283
static bool c5_notify_dma_ready(parlio_tx_unit_handle_t handle, const parlio_tx_done_event_data_t *edata, void *user_ctx)
@@ -1450,7 +1450,7 @@ void bbepWriteRow(FASTEPDSTATE *pState, uint8_t *pData, int iLen, int bRowStep)
14501450
}
14511451
dma_is_done = false;
14521452
gpio_set_level((gpio_num_t)pState->panelDef.ioCKV, 1); // CKV on
1453-
#ifdef ARDUINO_ESP32C5_DEV
1453+
#ifdef CONFIG_IDF_TARGET_ESP32C5
14541454
parlio_transmit_config_t tx_cfg;
14551455
memset(&tx_cfg, 0, sizeof(tx_cfg));
14561456
err = parlio_tx_unit_transmit(parlio_tx_handle, pData, (iLen + pState->panelDef.iLinePadding) * 8, &tx_cfg);
@@ -1486,7 +1486,7 @@ int bbepIOInit(FASTEPDSTATE *pState)
14861486
if (rc != BBEP_SUCCESS) return rc;
14871487
pState->iPartialPasses = 4; // N.B. The default number of passes for partial updates
14881488
pState->iFullPasses = 5; // the default number of passes for smooth and full updates
1489-
#ifdef ARDUINO_ESP32C5_DEV
1489+
#ifdef CONFIG_IDF_TARGET_ESP32C5
14901490
memset(&parlio_tx_config, 0, sizeof(parlio_tx_config));
14911491
parlio_tx_config.clk_src = PARLIO_CLK_SRC_DEFAULT;
14921492
parlio_tx_config.clk_in_gpio_num = (gpio_num_t)-1; // external clock disabled

0 commit comments

Comments
 (0)