Skip to content

Commit

Permalink
Fix v3.0.5 compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisxhe committed Nov 1, 2024
1 parent 3909c88 commit 5b1530e
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 28 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.vscode
.pio
.pio
test
10 changes: 5 additions & 5 deletions examples/button/button.ino
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ Button2 btn3(BUTTON_3);

uint8_t *framebuffer;
int vref = 1100;
int cursor_x = 20;
int cursor_y = 60;
int32_t cursor_x = 20;
int32_t cursor_y = 60;
int state = 0;

Rect_t area1 = {
Expand Down Expand Up @@ -91,10 +91,10 @@ void displayInfo(void)
write_string((GFXfont *)&FiraSans, "DeepSleep", &cursor_x, &cursor_y, NULL);
epd_poweroff_all();
#if defined(CONFIG_IDF_TARGET_ESP32)
// Set to wake up by GPIO39
esp_sleep_enable_ext1_wakeup(GPIO_SEL_39, ESP_EXT1_WAKEUP_ANY_LOW);
// Set to wake up by GPIO39
esp_sleep_enable_ext1_wakeup(_BV(GPIO_NUM_39), ESP_EXT1_WAKEUP_ANY_LOW);
#elif defined(CONFIG_IDF_TARGET_ESP32S3)
esp_sleep_enable_ext1_wakeup(GPIO_SEL_21, ESP_EXT1_WAKEUP_ANY_LOW);
esp_sleep_enable_ext1_wakeup(_BV(GPIO_NUM_21), ESP_EXT1_WAKEUP_ANY_LOW);
#endif
esp_deep_sleep_start();
break;
Expand Down
12 changes: 6 additions & 6 deletions examples/demo/demo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ void setup()
epd_draw_image(area, (uint8_t *)logo_data, BLACK_ON_WHITE);


int cursor_x = 200;
int cursor_y = 200;
int32_t cursor_x = 200;
int32_t cursor_y = 200;


#if defined(CONFIG_IDF_TARGET_ESP32S3)
Expand Down Expand Up @@ -285,8 +285,8 @@ void loop()
.height = 100,
};

int cursor_x = 200;
int cursor_y = 350;
int32_t cursor_x = 200;
int32_t cursor_y = 350;
epd_clear_area(area);

writeln((GFXfont *)&FiraSans, (char *)voltage.c_str(), &cursor_x, &cursor_y, NULL);
Expand Down Expand Up @@ -332,8 +332,8 @@ void loop()
// When reading the battery voltage, POWER_EN must be turned on
epd_poweron();

int cursor_x = 200;
int cursor_y = 450;
int32_t cursor_x = 200;
int32_t cursor_y = 450;

Rect_t area = {
.x = 200,
Expand Down
4 changes: 2 additions & 2 deletions examples/sleep/sleep.ino
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ void setup()
epd_poweron();
epd_clear();

int cursor_x = 200;
int cursor_y = 200;
int32_t cursor_x = 200;
int32_t cursor_y = 200;

String str = "➸ Boot Count:" + String(boot_count);
writeln((GFXfont *)&FiraSans, str.c_str(), &cursor_x, &cursor_y, NULL);
Expand Down
9 changes: 5 additions & 4 deletions examples/touch/touch.ino
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "lilygo.h"
#include <TouchDrvGT911.hpp> //Arduino IDE -> Library manager -> Install SensorLib v0.19
#include "utilities.h"
#include "hal/gpio_types.h"

TouchDrvGT911 touch;
uint8_t *framebuffer = NULL;
Expand Down Expand Up @@ -62,8 +63,8 @@ const char srceen_features[] = {

// const char *string_array[] = {overview, mcu_features, srceen_features};

int cursor_x = 20;
int cursor_y = 60;
int32_t cursor_x = 20;
int32_t cursor_y = 60;

Rect_t area1 = {
.x = 10,
Expand Down Expand Up @@ -218,9 +219,9 @@ void loop()

#if defined(CONFIG_IDF_TARGET_ESP32)
// Set to wake up by GPIO39
esp_sleep_enable_ext1_wakeup(GPIO_SEL_39, ESP_EXT1_WAKEUP_ANY_LOW);
esp_sleep_enable_ext1_wakeup(_BV(GPIO_NUM_39), ESP_EXT1_WAKEUP_ANY_LOW);
#elif defined(CONFIG_IDF_TARGET_ESP32S3)
esp_sleep_enable_ext1_wakeup(GPIO_SEL_21, ESP_EXT1_WAKEUP_ANY_LOW);
esp_sleep_enable_ext1_wakeup(_BV(GPIO_NUM_21), ESP_EXT1_WAKEUP_ANY_LOW);
#endif


Expand Down
4 changes: 2 additions & 2 deletions examples/wifi_sync/wifi_sync.ino
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,8 @@ void setup()
WiFi.begin(ssid, password);
sprintf(buf, "Connecting to %s", ssid);
DBG_OUTPUT_PORT.println(buf);
int cursor_x = line1Area.x;
int cursor_y = line1Area.y + FiraSans.advance_y + FiraSans.descender;
int32_t cursor_x = line1Area.x;
int32_t cursor_y = line1Area.y + FiraSans.advance_y + FiraSans.descender;
epd_clear_area(line1Area);
writeln((GFXfont *)&FiraSans, buf, &cursor_x, &cursor_y, NULL);

Expand Down
9 changes: 5 additions & 4 deletions src/ed047tc1.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <xtensa/core-macros.h>

#include <string.h>
#include <hal/gpio_ll.h>

/******************************************************************************/
/*** macro definitions ***/
Expand Down Expand Up @@ -213,7 +214,7 @@ static inline void latch_row()
push_cfg(&config_reg);
}

void IRAM_ATTR epd_skip()
void epd_skip()
{
#if defined(CONFIG_EPD_DISPLAY_TYPE_ED097TC2)
pulse_ckv_ticks(2, 2, false);
Expand All @@ -223,7 +224,7 @@ void IRAM_ATTR epd_skip()
#endif
}

void IRAM_ATTR epd_output_row(uint32_t output_time_dus)
void epd_output_row(uint32_t output_time_dus)
{
while (i2s_is_busy());

Expand All @@ -245,12 +246,12 @@ void epd_end_frame()
pulse_ckv_us(1, 1, true);
}

void IRAM_ATTR epd_switch_buffer()
void epd_switch_buffer()
{
i2s_switch_buffer();
}

uint8_t * IRAM_ATTR epd_get_current_buffer()
uint8_t * epd_get_current_buffer()
{
return (uint8_t *)i2s_get_current_buffer();
}
Expand Down
8 changes: 4 additions & 4 deletions src/ed047tc1.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,25 +111,25 @@ void epd_end_frame();
* This sequence of operations allows for pipelining data preparation and
* transfer, reducing total refresh times.
*/
void IRAM_ATTR epd_output_row(uint32_t output_time_dus);
void epd_output_row(uint32_t output_time_dus);

/**
* @brief Skip a row without writing to it.
*/
void IRAM_ATTR epd_skip();
void epd_skip();

/**
* @brief Get the currently writable line buffer.
*/
uint8_t * IRAM_ATTR epd_get_current_buffer();
uint8_t * epd_get_current_buffer();

/**
* @brief Switches front and back line buffer.
*
* @note If the switched-to line buffer is currently in use, this function
* blocks until transmission is done.
*/
void IRAM_ATTR epd_switch_buffer();
void epd_switch_buffer();

#ifdef __cplusplus
}
Expand Down

0 comments on commit 5b1530e

Please sign in to comment.