File tree Expand file tree Collapse file tree 1 file changed +1
-23
lines changed
Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,7 @@ ImageColor *_imagePtrJpeg = nullptr;
2626ImageColor *_imagePtrPng = nullptr ;
2727
2828// uint8_t (*ImageColor::ditherBuffer)[E_INK_WIDTH + 20] = nullptr;
29- uint8_t (*ImageColor::jpegDitherBuffer)[18 ] = nullptr ;
30- __attribute__ ((section(" .ext_ram.bss" ))) int16_t ImageColor::ditherBuffer[3][8][E_INK_WIDTH + 20];
29+ __attribute__ ((section(" .ext_ram.bss" ))) int16_t ImageColor::ditherBuffer[3][8][E_INK_HEIGHT];
3130
3231// int16_t (*ImageColor::ditherBuffer)[8][E_INK_WIDTH + 20] = nullptr;
3332// uint8_t *ImageColor::pixelBuffer = nullptr;
@@ -40,27 +39,6 @@ void ImageColor::begin(Inkplate *inkplateptr)
4039 _imagePtrJpeg = this ;
4140 _imagePtrPng = this ;
4241
43-
44- jpegDitherBuffer = (uint8_t (*)[18 ])heap_caps_calloc (18 , 18 , MALLOC_CAP_SPIRAM);
45-
46-
47- // pixelBuffer = (uint8_t *)heap_caps_calloc(1, (E_INK_WIDTH * 4 + 5), MALLOC_CAP_SPIRAM);
48-
49-
50- // ditherPalette = (uint32_t *)heap_caps_calloc(256, sizeof(uint32_t), MALLOC_CAP_SPIRAM);
51-
52-
53- // palette = (uint8_t *)heap_caps_calloc(128, sizeof(uint8_t), MALLOC_CAP_SPIRAM);
54-
55-
56- if (!jpegDitherBuffer || !ditherBuffer || !pixelBuffer || !ditherPalette || !palette)
57- {
58- Serial.println (" Failed to allocate one or more buffers (SRAM/PSRAM)" );
59- }
60- else
61- {
62- Serial.println (" Buffers allocated successfully in PSRAM" );
63- }
6442}
6543
6644/* *
You can’t perform that action at this time.
0 commit comments