Skip to content

Commit 28d0129

Browse files
committed
Update ifdefs to go with Inkplate 13 addition
1 parent 1203f3c commit 28d0129

File tree

10 files changed

+16
-14
lines changed

10 files changed

+16
-14
lines changed

src/Inkplate.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,11 @@ uint8_t Inkplate::getRotation()
115115

116116
void Inkplate::initLVGL(lv_display_render_mode_t renderMode)
117117
{
118-
Serial.println("Initializing LVGL...");
119-
120118
// Init the lvgl library itself
121119
lv_init();
122120

123121
// Define display resolution
124-
#ifndef ARDUINO_INKPLATE2
122+
#if !defined(ARDUINO_INKPLATE2) && !defined(ARDUINO_ESP32S3_DEV)
125123
uint32_t screen_width = E_INK_WIDTH;
126124
uint32_t screen_height = E_INK_HEIGHT;
127125
#else
@@ -134,7 +132,7 @@ void Inkplate::initLVGL(lv_display_render_mode_t renderMode)
134132

135133
if (renderMode == LV_DISPLAY_RENDER_MODE_PARTIAL)
136134
{
137-
#define PARTIAL_ROWS 16
135+
#define PARTIAL_ROWS 16
138136
buf_1 = (lv_color_t *)heap_caps_malloc(screen_width * PARTIAL_ROWS * (LV_COLOR_DEPTH / 8), MALLOC_CAP_8BIT);
139137
buf_2 = (lv_color_t *)heap_caps_malloc(screen_width * PARTIAL_ROWS * (LV_COLOR_DEPTH / 8), MALLOC_CAP_8BIT);
140138
buffer_size = screen_width * PARTIAL_ROWS * (LV_COLOR_DEPTH / 8);
@@ -163,7 +161,6 @@ void Inkplate::initLVGL(lv_display_render_mode_t renderMode)
163161
lv_display_set_color_format(disp, LV_COLOR_FORMAT_L8);
164162
#endif
165163

166-
167164
// Attach the buffer
168165
lv_display_set_buffers(disp, buf_1, buf_2, buffer_size, renderMode);
169166

src/boardSelect.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515

1616
#include <Arduino.h>
1717

18-
#ifdef ARDUINO_INKPLATE10V2
18+
#if defined(ARDUINO_ESP32S3_DEV)
19+
#define USE_COLOR_IMAGE
20+
#include "boards/Inkplate13/Inkplate13BoardFile.h"
21+
#elif defined(ARDUINO_INKPLATE10V2)
1922
#include "boards/Inkplate10/Inkplate10BoardFile.h"
2023
#elif defined(ARDUINO_INKPLATE6V2)
2124
#define USES_I2S

src/features/featureSelect.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#ifdef ARDUINO_INKPLATE10V2
55
#include "SdFat/SdFat.h"
66
#include "rtc/rtc.h"
7-
#elif defined(ARDUINO_INKPLATE6V2) || defined(ARDUINO_INKPLATE5V2) || defined(ARDUINO_INKPLATECOLOR)
7+
#elif defined(ARDUINO_INKPLATE6V2) || defined(ARDUINO_INKPLATE5V2) || defined(ARDUINO_INKPLATECOLOR) || defined(ARDUINO_ESP32S3_DEV)
88
#include "SdFat/SdFat.h"
99
#include "rtc/rtc.h"
1010
#elif defined(ARDUINO_INKPLATE6FLICK)

src/graphics/ditheringColor/ditherAlgorithm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "ditherAlgorithm.h"
22
#include "Inkplate-LVGL.h"
33

4-
#if defined(ARDUINO_INKPLATECOLOR) || defined(ARDUINO_INKPLATE2)
4+
#if defined(ARDUINO_INKPLATECOLOR) || defined(ARDUINO_INKPLATE2) || defined(ARDUINO_ESP32S3_DEV)
55

66
// RGB565 to RGBTRIPLE
77
void DitherAlgorithm::RGB565_to_RGBtriple(uint16_t c, uint8_t *r, uint8_t *g, uint8_t *b)

src/graphics/ditheringColor/ditherAlgorithm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#if defined(ARDUINO_INKPLATECOLOR) || defined(ARDUINO_INKPLATE2)
3+
#if defined(ARDUINO_INKPLATECOLOR) || defined(ARDUINO_INKPLATE2) || defined(ARDUINO_ESP32S3_DEV)
44

55
#include <stdio.h>
66
#include <stdlib.h>

src/graphics/ditheringGrayscale/ditherAlgorithm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "ditherAlgorithm.h"
22
#include "Inkplate-LVGL.h"
33

4-
#if !defined(ARDUINO_INKPLATECOLOR) && !defined(ARDUINO_INKPLATE2)
4+
#if !defined(ARDUINO_INKPLATECOLOR) && !defined(ARDUINO_INKPLATE2) && !defined(ARDUINO_ESP32S3_DEV)
55

66

77
void DitherAlgorithm::begin(Inkplate *inkplatePtr)

src/graphics/ditheringGrayscale/ditherAlgorithm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#if !defined(ARDUINO_INKPLATECOLOR) && !defined(ARDUINO_INKPLATE2)
3+
#if !defined(ARDUINO_INKPLATECOLOR) && !defined(ARDUINO_INKPLATE2) && !defined(ARDUINO_ESP32S3_DEV)
44

55
#include <stdio.h>
66
#include <stdlib.h>

src/lvgl/src/lv_conf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*====================*/
2828

2929
/** Color depth: 1 (I1), 8 (L8), 16 (RGB565), 24 (RGB888), 32 (XRGB8888) */
30-
#if !defined(ARDUINO_INKPLATECOLOR) && !defined(ARDUINO_INKPLATE2)
30+
#if !defined(ARDUINO_INKPLATECOLOR) && !defined(ARDUINO_INKPLATE2) && !defined(ARDUINO_ESP32S3_DEV)
3131
#define LV_COLOR_DEPTH 8
3232
#else
3333
#define LV_COLOR_DEPTH 16

src/system/InkplateBoards.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
#define __INKPLATE_BOARDS_H__
1616

1717
// Board selector. It only includes files for selected board.
18-
#ifdef ARDUINO_INKPLATE10V2
18+
#if defined(ARDUINO_ESP32S3_DEV)
19+
#include "boards/Inkplate13/Inkplate13BoardFile.h"
20+
#elif defined(ARDUINO_INKPLATE10V2)
1921
#include "../boards/Inkplate10/Inkplate10Driver.h"
2022
#elif defined(ARDUINO_INKPLATE6V2)
2123
#include "boards/Inkplate6/Inkplate6Driver.h"

src/system/defines.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#define INKPLATE10_WAVEFORM5 24
3232
#define INKPLATE6PLUS_WAVEFORM1 40
3333

34-
#if !defined(ARDUINO_INKPLATECOLOR) && !defined(ARDUINO_INKPLATE2)
34+
#if !defined(ARDUINO_INKPLATECOLOR) && !defined(ARDUINO_INKPLATE2) && !defined(ARDUINO_ESP32S3_DEV)
3535
#define BLACK 1
3636
#define WHITE 0
3737
#else

0 commit comments

Comments
 (0)