Skip to content

Commit 07f8f65

Browse files
Back off on the PROGMEM declarations; const is sufficient.
1 parent 7589eca commit 07f8f65

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

Adafruit_GFX.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ void Adafruit_GFX::fillTriangle(int16_t x0, int16_t y0,
462462
// Draw a PROGMEM-resident 1-bit image at the specified (x,y) position,
463463
// using the specified foreground color (unset bits are transparent).
464464
void Adafruit_GFX::drawBitmap(int16_t x, int16_t y,
465-
PROGMEM const uint8_t bitmap[], int16_t w, int16_t h, uint16_t color) {
465+
const uint8_t bitmap[], int16_t w, int16_t h, uint16_t color) {
466466

467467
int16_t byteWidth = (w + 7) / 8; // Bitmap scanline pad = whole byte
468468
uint8_t byte = 0;
@@ -482,7 +482,7 @@ void Adafruit_GFX::drawBitmap(int16_t x, int16_t y,
482482
// using the specified foreground (for set bits) and background (unset
483483
// bits) colors.
484484
void Adafruit_GFX::drawBitmap(int16_t x, int16_t y,
485-
PROGMEM const uint8_t bitmap[], int16_t w, int16_t h,
485+
const uint8_t bitmap[], int16_t w, int16_t h,
486486
uint16_t color, uint16_t bg) {
487487

488488
int16_t byteWidth = (w + 7) / 8; // Bitmap scanline pad = whole byte
@@ -544,7 +544,7 @@ void Adafruit_GFX::drawBitmap(int16_t x, int16_t y,
544544
// There is no RAM-resident version of this function; if generating bitmaps
545545
// in RAM, use the format defined by drawBitmap() and call that instead.
546546
void Adafruit_GFX::drawXBitmap(int16_t x, int16_t y,
547-
PROGMEM const uint8_t bitmap[], int16_t w, int16_t h, uint16_t color) {
547+
const uint8_t bitmap[], int16_t w, int16_t h, uint16_t color) {
548548

549549
int16_t byteWidth = (w + 7) / 8; // Bitmap scanline pad = whole byte
550550
uint8_t byte = 0;
@@ -566,7 +566,7 @@ void Adafruit_GFX::drawXBitmap(int16_t x, int16_t y,
566566
// pos. Specifically for 8-bit display devices such as IS31FL3731;
567567
// no color reduction/expansion is performed.
568568
void Adafruit_GFX::drawGrayscaleBitmap(int16_t x, int16_t y,
569-
PROGMEM const uint8_t bitmap[], int16_t w, int16_t h) {
569+
const uint8_t bitmap[], int16_t w, int16_t h) {
570570
startWrite();
571571
for(int16_t j=0; j<h; j++, y++) {
572572
for(int16_t i=0; i<w; i++ ) {
@@ -596,7 +596,7 @@ void Adafruit_GFX::drawGrayscaleBitmap(int16_t x, int16_t y,
596596
// Specifically for 8-bit display devices such as IS31FL3731;
597597
// no color reduction/expansion is performed.
598598
void Adafruit_GFX::drawGrayscaleBitmap(int16_t x, int16_t y,
599-
PROGMEM const uint8_t bitmap[], PROGMEM const uint8_t mask[],
599+
const uint8_t bitmap[], const uint8_t mask[],
600600
int16_t w, int16_t h) {
601601
int16_t bw = (w + 7) / 8; // Bitmask scanline pad = whole byte
602602
uint8_t byte = 0;
@@ -638,7 +638,7 @@ void Adafruit_GFX::drawGrayscaleBitmap(int16_t x, int16_t y,
638638
// Draw a PROGMEM-resident 16-bit image (RGB 5/6/5) at the specified (x,y)
639639
// position. For 16-bit display devices; no color reduction performed.
640640
void Adafruit_GFX::drawRGBBitmap(int16_t x, int16_t y,
641-
PROGMEM const uint16_t bitmap[], int16_t w, int16_t h) {
641+
const uint16_t bitmap[], int16_t w, int16_t h) {
642642
startWrite();
643643
for(int16_t j=0; j<h; j++, y++) {
644644
for(int16_t i=0; i<w; i++ ) {
@@ -666,7 +666,7 @@ void Adafruit_GFX::drawRGBBitmap(int16_t x, int16_t y,
666666
// BOTH buffers (color and mask) must be PROGMEM-resident.
667667
// For 16-bit display devices; no color reduction performed.
668668
void Adafruit_GFX::drawRGBBitmap(int16_t x, int16_t y,
669-
PROGMEM const uint16_t bitmap[], PROGMEM const uint8_t mask[],
669+
const uint16_t bitmap[], const uint8_t mask[],
670670
int16_t w, int16_t h) {
671671
int16_t bw = (w + 7) / 8; // Bitmask scanline pad = whole byte
672672
uint8_t byte = 0;

Adafruit_GFX.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,31 +64,31 @@ class Adafruit_GFX : public Print {
6464
int16_t radius, uint16_t color),
6565
fillRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h,
6666
int16_t radius, uint16_t color),
67-
drawBitmap(int16_t x, int16_t y, PROGMEM const uint8_t bitmap[],
67+
drawBitmap(int16_t x, int16_t y, const uint8_t bitmap[],
6868
int16_t w, int16_t h, uint16_t color),
69-
drawBitmap(int16_t x, int16_t y, PROGMEM const uint8_t bitmap[],
69+
drawBitmap(int16_t x, int16_t y, const uint8_t bitmap[],
7070
int16_t w, int16_t h, uint16_t color, uint16_t bg),
7171
drawBitmap(int16_t x, int16_t y, uint8_t *bitmap,
7272
int16_t w, int16_t h, uint16_t color),
7373
drawBitmap(int16_t x, int16_t y, uint8_t *bitmap,
7474
int16_t w, int16_t h, uint16_t color, uint16_t bg),
75-
drawXBitmap(int16_t x, int16_t y, PROGMEM const uint8_t bitmap[],
75+
drawXBitmap(int16_t x, int16_t y, const uint8_t bitmap[],
7676
int16_t w, int16_t h, uint16_t color),
77-
drawGrayscaleBitmap(int16_t x, int16_t y, PROGMEM const uint8_t bitmap[],
77+
drawGrayscaleBitmap(int16_t x, int16_t y, const uint8_t bitmap[],
7878
int16_t w, int16_t h),
7979
drawGrayscaleBitmap(int16_t x, int16_t y, uint8_t *bitmap,
8080
int16_t w, int16_t h),
8181
drawGrayscaleBitmap(int16_t x, int16_t y,
82-
PROGMEM const uint8_t bitmap[], PROGMEM const uint8_t mask[],
82+
const uint8_t bitmap[], const uint8_t mask[],
8383
int16_t w, int16_t h),
8484
drawGrayscaleBitmap(int16_t x, int16_t y,
8585
uint8_t *bitmap, uint8_t *mask, int16_t w, int16_t h),
86-
drawRGBBitmap(int16_t x, int16_t y, PROGMEM const uint16_t bitmap[],
86+
drawRGBBitmap(int16_t x, int16_t y, const uint16_t bitmap[],
8787
int16_t w, int16_t h),
8888
drawRGBBitmap(int16_t x, int16_t y, uint16_t *bitmap,
8989
int16_t w, int16_t h),
9090
drawRGBBitmap(int16_t x, int16_t y,
91-
PROGMEM const uint16_t bitmap[], PROGMEM const uint8_t mask[],
91+
const uint16_t bitmap[], const uint8_t mask[],
9292
int16_t w, int16_t h),
9393
drawRGBBitmap(int16_t x, int16_t y,
9494
uint16_t *bitmap, uint8_t *mask, int16_t w, int16_t h),

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Adafruit GFX Library
2-
version=1.2.1
2+
version=1.2.2
33
author=Adafruit
44
maintainer=Adafruit <[email protected]>
55
sentence=Adafruit GFX graphics core library, this is the 'core' class that all our other graphics libraries derive from.

0 commit comments

Comments
 (0)