Skip to content

Commit 5438181

Browse files
authored
Merge pull request #706 from lovyan03/develop
1.2.7
2 parents 55a0f66 + c9788cf commit 5438181

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+8378
-7517
lines changed

.github/scripts/esp-idf-versions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
$hardcoded_fqbns = ['[email protected]', '[email protected]'];
3737

3838
// restrict output to these idf targets, other targets will be ignored
39-
$idf_boards = ['esp32', 'esp32s2', 'esp32s3', 'esp32c6'/*, 'esp32h2', 'esp32p4', 'esp32c5'*/];
39+
$idf_boards = ['esp32', 'esp32s2', 'esp32s3', 'esp32c6', 'esp32p4'/*, 'esp32h2', 'esp32c5'*/];
4040

4141
// get the official support matrix from the espressif website
4242
// it contains a JavaScript object declaration with all necessary chip/version informations

.github/workflows/ArduinoBuild.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ on:
1313
- '**.c'
1414
- '**ArduinoBuild.yml'
1515
pull_request:
16+
workflow_dispatch:
1617

1718
jobs:
1819
build:

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"type": "git",
1919
"url": "https://github.com/lovyan03/LovyanGFX.git"
2020
},
21-
"version": "1.2.0",
21+
"version": "1.2.7",
2222
"frameworks": ["arduino", "espidf", "*"],
2323
"platforms": ["espressif32", "espressif8266", "atmelsam", "native", "raspberrypi"],
2424
"headers": "LovyanGFX.hpp",

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=LovyanGFX
2-
version=1.2.0
2+
version=1.2.7
33
author=lovyan03
44
maintainer=lovyan03,tobozo
55
sentence=TFT LCD Graphics driver with touch for ESP32/ESP8266, SAMD21/SAMD51, RP2040/RP2350

src/lgfx/boards.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ namespace lgfx
6464
, board_ESP32_S3_BOX_Lite
6565
, board_LoLinS3Pro
6666
, board_ESP32_S3_BOX_V3
67+
, board_Guition_ESP32_2432W328
6768
};
6869
}
6970
using namespace boards;

src/lgfx/v1/LGFXBase.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1395,6 +1395,7 @@ namespace lgfx
13951395
: (dst_depth == rgb332_1Byte) ? pixelcopy_t::copy_grayscale_affine<rgb332_t>
13961396
: (dst_depth == rgb888_3Byte) ? pixelcopy_t::copy_grayscale_affine<bgr888_t>
13971397
: (dst_depth == rgb666_3Byte) ? pixelcopy_t::copy_grayscale_affine<bgr666_t>
1398+
: (dst_depth == grayscale_8bit) ? pixelcopy_t::copy_grayscale_affine<grayscale_t>
13981399
: nullptr;
13991400

14001401
return pc;
@@ -1876,6 +1877,7 @@ namespace lgfx
18761877
case color_depth_t::rgb666_3Byte: p.fp_copy = pixelcopy_t::compare_rgb_affine<bgr666_t>; break;
18771878
case color_depth_t::rgb565_2Byte: p.fp_copy = pixelcopy_t::compare_rgb_affine<swap565_t>; break;
18781879
case color_depth_t::rgb332_1Byte: p.fp_copy = pixelcopy_t::compare_rgb_affine<rgb332_t>; break;
1880+
case color_depth_t::grayscale_8bit: p.fp_copy = pixelcopy_t::compare_rgb_affine<grayscale_t>; break;
18791881
default: p.fp_copy = pixelcopy_t::compare_bit_affine;
18801882
p.src_mask = (1 << p.src_bits) - 1;
18811883
p.transp &= p.src_mask;
@@ -2935,7 +2937,7 @@ namespace lgfx
29352937
lgfxJdec jpegdec;
29362938

29372939
static constexpr uint16_t sz_pool = 3900;
2938-
uint8_t *pool = (uint8_t*)heap_alloc_dma(sz_pool);
2940+
uint8_t *pool = (uint8_t*)malloc(sz_pool);
29392941
if (!pool)
29402942
{
29412943
// ESP_LOGW("LGFX", "jpeg memory alloc fail");
@@ -2947,7 +2949,7 @@ namespace lgfx
29472949
if (jres != JDR_OK)
29482950
{
29492951
// ESP_LOGW("LGFX", "jpeg prepare error:%x", jres);
2950-
heap_free(pool);
2952+
free(pool);
29512953
return false;
29522954
}
29532955

@@ -2963,7 +2965,7 @@ namespace lgfx
29632965
, datum
29642966
, jpegdec.width, jpegdec.height))
29652967
{
2966-
heap_free(pool);
2968+
free(pool);
29672969
return false;
29682970
}
29692971

@@ -2990,7 +2992,7 @@ namespace lgfx
29902992
this->endWrite();
29912993
drawinfo.data->preRead();
29922994

2993-
heap_free(pool);
2995+
free(pool);
29942996

29952997
if (jres != JDR_OK) {
29962998
// ESP_LOGW("LGFX", "jpeg decomp error:%x", jres);

src/lgfx/v1/LGFXBase.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,10 @@ namespace lgfx
299299
LGFX_INLINE_T void fillScreen ( const T& color) { setColor(color); fillRect(0, 0, width(), height()); }
300300
LGFX_INLINE void fillScreen ( void ) { fillRect(0, 0, width(), height()); }
301301

302-
LGFX_INLINE_T void clear ( const T& color) { setBaseColor(color); clear(); }
303-
LGFX_INLINE void clear ( void ) { setColor(_base_rgb888); fillScreen(); }
304-
LGFX_INLINE_T void clearDisplay( const T& color) { setBaseColor(color); clear(); }
305-
LGFX_INLINE void clearDisplay( void ) { setColor(_base_rgb888); fillScreen(); }
302+
LGFX_INLINE_T void clear ( const T& color) { setBaseColor(color); clearDisplay(); }
303+
LGFX_INLINE void clear ( void ) { clearDisplay(); }
304+
LGFX_INLINE_T void clearDisplay( const T& color) { setBaseColor(color); clearDisplay(); }
305+
LGFX_INLINE void clearDisplay( void ) { if (isEPD()) { waitDisplay(); fillScreen(~_base_rgb888); waitDisplay(); } fillScreen(_base_rgb888); }
306306

307307
LGFX_INLINE void setPivot(float x, float y) { _xpivot = x; _ypivot = y; }
308308
LGFX_INLINE float getPivotX(void) const { return _xpivot; }
@@ -1408,7 +1408,7 @@ namespace lgfx
14081408

14091409
bool init(void) { return init_impl(true , true); };
14101410
bool begin(void) { return init_impl(true , true); };
1411-
bool init_without_reset(void) { return init_impl(false, false); };
1411+
bool init_without_reset(bool clear = false) { return init_impl(false, clear); };
14121412
board_t getBoard(void) const { return _board; }
14131413
void initBus(void);
14141414
void releaseBus(void);

src/lgfx/v1/gitTagVersion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#define LGFX_VERSION_MAJOR 1
22
#define LGFX_VERSION_MINOR 2
3-
#define LGFX_VERSION_PATCH 0
3+
#define LGFX_VERSION_PATCH 7
44
#define LOVYANGFX_VERSION F( LGFX_VERSION_MAJOR "." LGFX_VERSION_MINOR "." LGFX_VERSION_PATCH )

src/lgfx/v1/misc/DataWrapper.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ namespace lgfx
176176

177177
//----------------------------------------------------------------------------
178178

179-
#if defined (SdFat_h)
179+
#if defined (SdFat_h) || defined (SD_FAT_VERSION)
180180
// #if SD_FAT_VERSION >= 20102
181181
// #define LGFX_SDFAT_TYPE SdBase<FsVolume,FsFormatter>
182182
// #else

src/lgfx/v1/misc/SpriteBuffer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ namespace lgfx
153153
}
154154
}
155155

156+
bool SpriteBuffer::use_dma(void) const { return _source == AllocationSource::Dma || heap_capable_dma(_buffer); }
157+
156158
//----------------------------------------------------------------------------
157159
}
158160
}

0 commit comments

Comments
 (0)