From c40e9e9f00b8098623e5b3c5a0daede6a5cb37e8 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 31 Dec 2019 18:11:13 +1100 Subject: [PATCH 1/3] Clean up includes for glcdfont headers --- drivers/avr/glcdfont.c | 13 ++----------- drivers/oled/glcdfont.c | 9 +-------- drivers/oled/oled_driver.c | 13 ++++--------- keyboards/claw44/lib/glcdfont.c | 13 ++----------- keyboards/comet46/lib/glcdfont.c | 13 ++----------- keyboards/crkbd/keymaps/drashna/glcdfont.c | 9 +-------- keyboards/crkbd/keymaps/kidbrazil/glcdfont.c | 13 ++----------- keyboards/crkbd/keymaps/rpbaptist/glcdfont.c | 9 +-------- keyboards/crkbd/keymaps/soundmonster/glcdfont.c | 9 +-------- keyboards/crkbd/lib/glcdfont.c | 13 ++----------- .../owlet60/keymaps/oled_testing/customfont.c | 9 +-------- keyboards/helix/common/glcdfont.c | 13 ++----------- keyboards/helix/rev2/keymaps/froggy/helixfont.h | 13 ++----------- keyboards/lily58/lib/glcdfont.c | 13 ++----------- keyboards/orthodox/common/glcdfont.c | 13 ++----------- keyboards/rgbkb/sol/common/glcdfont.c | 9 +-------- keyboards/rgbkb/zen/common/glcdfont.c | 9 +-------- keyboards/rgbkb/zygomorph/common/glcdfont.c | 13 ++----------- keyboards/treadstone48/common/glcdfont.c | 13 ++----------- keyboards/uzu42/keymaps/default/glcdfont_uzu42.c | 13 ++----------- keyboards/yosino58/lib/glcdfont.c | 13 ++----------- keyboards/yosino58/lib/glcdfont_.c | 13 ++----------- tmk_core/common/progmem.h | 5 +---- users/drashna/font_gmk_bad.h | 9 +-------- users/drashna/hue_manitee_font.h | 9 +-------- 25 files changed, 42 insertions(+), 239 deletions(-) diff --git a/drivers/avr/glcdfont.c b/drivers/avr/glcdfont.c index 2c332ea6db41..c42140090236 100644 --- a/drivers/avr/glcdfont.c +++ b/drivers/avr/glcdfont.c @@ -1,17 +1,9 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H +#pragma once -#ifdef __AVR__ -# include -# include -#elif defined(ESP8266) -# include -#else -# define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font @@ -31,4 +23,3 @@ static const unsigned char font[] PROGMEM = { 0x14, 0x14, 0x14, 0xF4, 0x14, 0x10, 0x10, 0xF0, 0x10, 0xF0, 0x00, 0x00, 0x1F, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x1F, 0x14, 0x00, 0x00, 0x00, 0xFC, 0x14, 0x00, 0x00, 0xF0, 0x10, 0xF0, 0x10, 0x10, 0xFF, 0x10, 0xFF, 0x14, 0x14, 0x14, 0xFF, 0x14, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x38, 0x44, 0x44, 0x38, 0x44, 0xFC, 0x4A, 0x4A, 0x4A, 0x34, // sharp-s or beta 0x7E, 0x02, 0x02, 0x06, 0x06, 0x02, 0x7E, 0x02, 0x7E, 0x02, 0x63, 0x55, 0x49, 0x41, 0x63, 0x38, 0x44, 0x44, 0x3C, 0x04, 0x40, 0x7E, 0x20, 0x1E, 0x20, 0x06, 0x02, 0x7E, 0x02, 0x02, 0x99, 0xA5, 0xE7, 0xA5, 0x99, 0x1C, 0x2A, 0x49, 0x2A, 0x1C, 0x4C, 0x72, 0x01, 0x72, 0x4C, 0x30, 0x4A, 0x4D, 0x4D, 0x30, 0x30, 0x48, 0x78, 0x48, 0x30, 0xBC, 0x62, 0x5A, 0x46, 0x3D, 0x3E, 0x49, 0x49, 0x49, 0x00, 0x7E, 0x01, 0x01, 0x01, 0x7E, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x44, 0x44, 0x5F, 0x44, 0x44, 0x40, 0x51, 0x4A, 0x44, 0x40, 0x40, 0x44, 0x4A, 0x51, 0x40, 0x00, 0x00, 0xFF, 0x01, 0x03, 0xE0, 0x80, 0xFF, 0x00, 0x00, 0x08, 0x08, 0x6B, 0x6B, 0x08, 0x36, 0x12, 0x36, 0x24, 0x36, 0x06, 0x0F, 0x09, 0x0F, 0x06, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x30, 0x40, 0xFF, 0x01, 0x01, 0x00, 0x1F, 0x01, 0x01, 0x1E, 0x00, 0x19, 0x1D, 0x17, 0x12, 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00 // #255 NBSP }; -#endif // FONT5X7_H diff --git a/drivers/oled/glcdfont.c b/drivers/oled/glcdfont.c index 95c5d2ebf417..205fba7afca4 100644 --- a/drivers/oled/glcdfont.c +++ b/drivers/oled/glcdfont.c @@ -1,13 +1,6 @@ #pragma once -#ifdef __AVR__ -# include -# include -#elif defined(ESP8266) -# include -#else -# define PROGMEM -#endif +#include "progmem.h" // Helidox 8x6 font with QMK Firmware Logo // Online editor: http://teripom.x0.com/ diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c index f20f4629aafa..a8808fb0089f 100644 --- a/drivers/oled/oled_driver.c +++ b/drivers/oled/oled_driver.c @@ -22,15 +22,10 @@ along with this program. If not, see . #include -#if defined(__AVR__) -# include -# include -#elif defined(ESP8266) -# include -#else // defined(ESP8266) -# define PROGMEM +#include "progmem.h" +#ifndef __AVR__ # define memcpy_P(des, src, len) memcpy(des, src, len) -#endif // defined(__AVR__) +#endif // Used commands from spec sheet: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf // for SH1106: https://www.velleman.eu/downloads/29/infosheets/sh1106_datasheet.pdf @@ -585,4 +580,4 @@ void oled_task(void) { #endif } -__attribute__((weak)) void oled_task_user(void) {} \ No newline at end of file +__attribute__((weak)) void oled_task_user(void) {} diff --git a/keyboards/claw44/lib/glcdfont.c b/keyboards/claw44/lib/glcdfont.c index 91f53d9c24ea..69707d58af31 100644 --- a/keyboards/claw44/lib/glcdfont.c +++ b/keyboards/claw44/lib/glcdfont.c @@ -1,17 +1,9 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H +#pragma once -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font const unsigned char font[] PROGMEM = { @@ -240,4 +232,3 @@ const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -#endif // FONT5X7_H diff --git a/keyboards/comet46/lib/glcdfont.c b/keyboards/comet46/lib/glcdfont.c index e912d2233c42..4ede1f514200 100644 --- a/keyboards/comet46/lib/glcdfont.c +++ b/keyboards/comet46/lib/glcdfont.c @@ -1,17 +1,9 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H +#pragma once -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font @@ -145,4 +137,3 @@ const unsigned char font[] PROGMEM = { 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00 }; -#endif // FONT5X7_H diff --git a/keyboards/crkbd/keymaps/drashna/glcdfont.c b/keyboards/crkbd/keymaps/drashna/glcdfont.c index 2bfc3fac6d44..ff9d7e6af7d0 100644 --- a/keyboards/crkbd/keymaps/drashna/glcdfont.c +++ b/keyboards/crkbd/keymaps/drashna/glcdfont.c @@ -1,13 +1,6 @@ #pragma once -#ifdef __AVR__ -# include -# include -#elif defined(ESP8266) -# include -#else -# define PROGMEM -#endif +#include "progmem.h" // Corne 8x6 font with QMK Firmware Logo // Online editor: https://helixfonteditor.netlify.com/ diff --git a/keyboards/crkbd/keymaps/kidbrazil/glcdfont.c b/keyboards/crkbd/keymaps/kidbrazil/glcdfont.c index a67c329242ed..fa8c3e63549a 100644 --- a/keyboards/crkbd/keymaps/kidbrazil/glcdfont.c +++ b/keyboards/crkbd/keymaps/kidbrazil/glcdfont.c @@ -1,17 +1,9 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H +#pragma once -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font const unsigned char font[] PROGMEM = { @@ -240,4 +232,3 @@ const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -#endif // FONT5X7_H diff --git a/keyboards/crkbd/keymaps/rpbaptist/glcdfont.c b/keyboards/crkbd/keymaps/rpbaptist/glcdfont.c index 044c16d9c16b..893c81fbcd0b 100644 --- a/keyboards/crkbd/keymaps/rpbaptist/glcdfont.c +++ b/keyboards/crkbd/keymaps/rpbaptist/glcdfont.c @@ -1,13 +1,6 @@ #pragma once -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Helidox 8x6 font with QMK Firmware Logo // Online editor: http://teripom.x0.com/ diff --git a/keyboards/crkbd/keymaps/soundmonster/glcdfont.c b/keyboards/crkbd/keymaps/soundmonster/glcdfont.c index 291445b5e3df..04612d3169b1 100644 --- a/keyboards/crkbd/keymaps/soundmonster/glcdfont.c +++ b/keyboards/crkbd/keymaps/soundmonster/glcdfont.c @@ -1,13 +1,6 @@ #pragma once -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Corne 8x6 font with QMK Firmware Logo // Online editor: https://helixfonteditor.netlify.com/ diff --git a/keyboards/crkbd/lib/glcdfont.c b/keyboards/crkbd/lib/glcdfont.c index f7567c57c6c8..d1be2deba058 100644 --- a/keyboards/crkbd/lib/glcdfont.c +++ b/keyboards/crkbd/lib/glcdfont.c @@ -1,17 +1,9 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H +#pragma once -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font const unsigned char font[] PROGMEM = { @@ -240,4 +232,3 @@ const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -#endif // FONT5X7_H diff --git a/keyboards/handwired/owlet60/keymaps/oled_testing/customfont.c b/keyboards/handwired/owlet60/keymaps/oled_testing/customfont.c index b7ad73bfa25d..0f1fd9c1561d 100644 --- a/keyboards/handwired/owlet60/keymaps/oled_testing/customfont.c +++ b/keyboards/handwired/owlet60/keymaps/oled_testing/customfont.c @@ -1,13 +1,6 @@ #pragma once -#ifdef __AVR__ -# include -# include -#elif defined(ESP8266) -# include -#else -# define PROGMEM -#endif +#include "progmem.h" // Helidox 8x6 font with QMK Firmware Logo // Online editor: http://teripom.x0.com/ diff --git a/keyboards/helix/common/glcdfont.c b/keyboards/helix/common/glcdfont.c index 89665ba07432..1cf75515bb3a 100644 --- a/keyboards/helix/common/glcdfont.c +++ b/keyboards/helix/common/glcdfont.c @@ -1,17 +1,9 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H +#pragma once -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font @@ -241,4 +233,3 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -#endif // FONT5X7_H diff --git a/keyboards/helix/rev2/keymaps/froggy/helixfont.h b/keyboards/helix/rev2/keymaps/froggy/helixfont.h index 7f54748151a4..5360eace95b6 100644 --- a/keyboards/helix/rev2/keymaps/froggy/helixfont.h +++ b/keyboards/helix/rev2/keymaps/froggy/helixfont.h @@ -1,17 +1,9 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H +#pragma once -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font @@ -241,4 +233,3 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -#endif // FONT5X7_H diff --git a/keyboards/lily58/lib/glcdfont.c b/keyboards/lily58/lib/glcdfont.c index c691ea9d0be0..6990816a536b 100644 --- a/keyboards/lily58/lib/glcdfont.c +++ b/keyboards/lily58/lib/glcdfont.c @@ -1,17 +1,9 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H +#pragma once -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font const unsigned char font[] PROGMEM = { @@ -240,4 +232,3 @@ const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -#endif // FONT5X7_H diff --git a/keyboards/orthodox/common/glcdfont.c b/keyboards/orthodox/common/glcdfont.c index 6f88bd23a781..a0c97321402e 100644 --- a/keyboards/orthodox/common/glcdfont.c +++ b/keyboards/orthodox/common/glcdfont.c @@ -1,17 +1,9 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H +#pragma once -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font @@ -273,4 +265,3 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00 // #255 NBSP }; -#endif // FONT5X7_H diff --git a/keyboards/rgbkb/sol/common/glcdfont.c b/keyboards/rgbkb/sol/common/glcdfont.c index 61b40c092ef2..b8e66cba1f40 100644 --- a/keyboards/rgbkb/sol/common/glcdfont.c +++ b/keyboards/rgbkb/sol/common/glcdfont.c @@ -1,13 +1,6 @@ #pragma once -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Helidox 8x6 font with RGBKB SOL Logo // Online editor: http://teripom.x0.com/ diff --git a/keyboards/rgbkb/zen/common/glcdfont.c b/keyboards/rgbkb/zen/common/glcdfont.c index 3b4ccfa95c64..78a2536be75b 100644 --- a/keyboards/rgbkb/zen/common/glcdfont.c +++ b/keyboards/rgbkb/zen/common/glcdfont.c @@ -2,14 +2,7 @@ #pragma once -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/keyboards/rgbkb/zygomorph/common/glcdfont.c b/keyboards/rgbkb/zygomorph/common/glcdfont.c index 89665ba07432..1cf75515bb3a 100644 --- a/keyboards/rgbkb/zygomorph/common/glcdfont.c +++ b/keyboards/rgbkb/zygomorph/common/glcdfont.c @@ -1,17 +1,9 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H +#pragma once -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font @@ -241,4 +233,3 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -#endif // FONT5X7_H diff --git a/keyboards/treadstone48/common/glcdfont.c b/keyboards/treadstone48/common/glcdfont.c index 32c688e2bb38..22fe8655d727 100644 --- a/keyboards/treadstone48/common/glcdfont.c +++ b/keyboards/treadstone48/common/glcdfont.c @@ -1,17 +1,9 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H +#pragma once -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font @@ -241,4 +233,3 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -#endif // FONT5X7_H diff --git a/keyboards/uzu42/keymaps/default/glcdfont_uzu42.c b/keyboards/uzu42/keymaps/default/glcdfont_uzu42.c index f5524ec73710..5ef5b0a51d9f 100644 --- a/keyboards/uzu42/keymaps/default/glcdfont_uzu42.c +++ b/keyboards/uzu42/keymaps/default/glcdfont_uzu42.c @@ -1,17 +1,9 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H +#pragma once -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font const unsigned char font[] PROGMEM = { @@ -240,4 +232,3 @@ const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -#endif // FONT5X7_H diff --git a/keyboards/yosino58/lib/glcdfont.c b/keyboards/yosino58/lib/glcdfont.c index 01b656cc6266..b9f50cc44391 100644 --- a/keyboards/yosino58/lib/glcdfont.c +++ b/keyboards/yosino58/lib/glcdfont.c @@ -1,17 +1,9 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H +#pragma once -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font const unsigned char font[] PROGMEM = { @@ -272,4 +264,3 @@ const unsigned char font[] PROGMEM = { 0xF0, 0xF8, 0xF8, 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x3F }; -#endif // FONT5X7_H diff --git a/keyboards/yosino58/lib/glcdfont_.c b/keyboards/yosino58/lib/glcdfont_.c index 122b26afa361..4fcc7923598b 100644 --- a/keyboards/yosino58/lib/glcdfont_.c +++ b/keyboards/yosino58/lib/glcdfont_.c @@ -1,17 +1,9 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H +#pragma once -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font const unsigned char font[] PROGMEM = { @@ -240,4 +232,3 @@ const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -#endif // FONT5X7_H diff --git a/tmk_core/common/progmem.h b/tmk_core/common/progmem.h index 88373f478b3f..a06d0f940fbb 100644 --- a/tmk_core/common/progmem.h +++ b/tmk_core/common/progmem.h @@ -1,5 +1,4 @@ -#ifndef PROGMEM_H -#define PROGMEM_H 1 +#pragma once #if defined(__AVR__) # include @@ -9,5 +8,3 @@ # define pgm_read_word(p) *((uint16_t*)(p)) # define pgm_read_dword(p) *((uint32_t*)(p)) #endif - -#endif diff --git a/users/drashna/font_gmk_bad.h b/users/drashna/font_gmk_bad.h index c1c5c390a95a..2f660d7eb58d 100644 --- a/users/drashna/font_gmk_bad.h +++ b/users/drashna/font_gmk_bad.h @@ -1,13 +1,6 @@ #pragma once -#ifdef __AVR__ -# include -# include -#elif defined(ESP8266) -# include -#else -# define PROGMEM -#endif +#include "progmem.h" // Corne 8x6 font with QMK Firmware Logo // Online editor: https://helixfonteditor.netlify.com/ diff --git a/users/drashna/hue_manitee_font.h b/users/drashna/hue_manitee_font.h index 72d50f7a6ab4..2deb4d32dc37 100644 --- a/users/drashna/hue_manitee_font.h +++ b/users/drashna/hue_manitee_font.h @@ -1,13 +1,6 @@ #pragma once -#ifdef __AVR__ -# include -# include -#elif defined(ESP8266) -# include -#else -# define PROGMEM -#endif +#include "progmem.h" // Corne 8x6 font with QMK Firmware Logo // Online editor: https://helixfonteditor.netlify.com/ From c9f8fce2e2689d6ef3ba510953f13fe886306fe7 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 31 Dec 2019 18:43:43 +1100 Subject: [PATCH 2/3] Remove pragma once, most of these are not headers --- drivers/avr/glcdfont.c | 2 -- drivers/oled/glcdfont.c | 2 -- keyboards/claw44/lib/glcdfont.c | 2 -- keyboards/comet46/lib/glcdfont.c | 2 -- keyboards/crkbd/keymaps/drashna/glcdfont.c | 2 -- keyboards/crkbd/keymaps/kidbrazil/glcdfont.c | 2 -- keyboards/crkbd/keymaps/rpbaptist/glcdfont.c | 2 -- keyboards/crkbd/keymaps/soundmonster/glcdfont.c | 2 -- keyboards/crkbd/lib/glcdfont.c | 2 -- .../owlet60/keymaps/oled_testing/customfont.c | 2 -- keyboards/helix/common/glcdfont.c | 2 -- keyboards/lily58/lib/glcdfont.c | 2 -- keyboards/orthodox/common/glcdfont.c | 2 -- keyboards/rgbkb/sol/common/glcdfont.c | 2 -- keyboards/rgbkb/zen/common/glcdfont.c | 2 -- keyboards/rgbkb/zygomorph/common/glcdfont.c | 2 -- keyboards/treadstone48/common/glcdfont.c | 2 -- keyboards/uzu42/keymaps/default/glcdfont_uzu42.c | 2 -- keyboards/yosino58/lib/glcdfont.c | 2 -- keyboards/yosino58/lib/glcdfont_.c | 2 -- users/tominabox1/doug.c | 13 +------------ 21 files changed, 1 insertion(+), 52 deletions(-) diff --git a/drivers/avr/glcdfont.c b/drivers/avr/glcdfont.c index c42140090236..5e763b054f89 100644 --- a/drivers/avr/glcdfont.c +++ b/drivers/avr/glcdfont.c @@ -1,8 +1,6 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#pragma once - #include "progmem.h" // Standard ASCII 5x7 font diff --git a/drivers/oled/glcdfont.c b/drivers/oled/glcdfont.c index 205fba7afca4..de5896018986 100644 --- a/drivers/oled/glcdfont.c +++ b/drivers/oled/glcdfont.c @@ -1,5 +1,3 @@ -#pragma once - #include "progmem.h" // Helidox 8x6 font with QMK Firmware Logo diff --git a/keyboards/claw44/lib/glcdfont.c b/keyboards/claw44/lib/glcdfont.c index 69707d58af31..9fa1c806aa72 100644 --- a/keyboards/claw44/lib/glcdfont.c +++ b/keyboards/claw44/lib/glcdfont.c @@ -1,8 +1,6 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#pragma once - #include "progmem.h" // Standard ASCII 5x7 font diff --git a/keyboards/comet46/lib/glcdfont.c b/keyboards/comet46/lib/glcdfont.c index 4ede1f514200..361d0c3dc65c 100644 --- a/keyboards/comet46/lib/glcdfont.c +++ b/keyboards/comet46/lib/glcdfont.c @@ -1,8 +1,6 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#pragma once - #include "progmem.h" // Standard ASCII 5x7 font diff --git a/keyboards/crkbd/keymaps/drashna/glcdfont.c b/keyboards/crkbd/keymaps/drashna/glcdfont.c index ff9d7e6af7d0..10ce3b345737 100644 --- a/keyboards/crkbd/keymaps/drashna/glcdfont.c +++ b/keyboards/crkbd/keymaps/drashna/glcdfont.c @@ -1,5 +1,3 @@ -#pragma once - #include "progmem.h" // Corne 8x6 font with QMK Firmware Logo diff --git a/keyboards/crkbd/keymaps/kidbrazil/glcdfont.c b/keyboards/crkbd/keymaps/kidbrazil/glcdfont.c index fa8c3e63549a..ea1f3bd76b0d 100644 --- a/keyboards/crkbd/keymaps/kidbrazil/glcdfont.c +++ b/keyboards/crkbd/keymaps/kidbrazil/glcdfont.c @@ -1,8 +1,6 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#pragma once - #include "progmem.h" // Standard ASCII 5x7 font diff --git a/keyboards/crkbd/keymaps/rpbaptist/glcdfont.c b/keyboards/crkbd/keymaps/rpbaptist/glcdfont.c index 893c81fbcd0b..ac1f11dbbe2b 100644 --- a/keyboards/crkbd/keymaps/rpbaptist/glcdfont.c +++ b/keyboards/crkbd/keymaps/rpbaptist/glcdfont.c @@ -1,5 +1,3 @@ -#pragma once - #include "progmem.h" // Helidox 8x6 font with QMK Firmware Logo diff --git a/keyboards/crkbd/keymaps/soundmonster/glcdfont.c b/keyboards/crkbd/keymaps/soundmonster/glcdfont.c index 04612d3169b1..588ecfd8c886 100644 --- a/keyboards/crkbd/keymaps/soundmonster/glcdfont.c +++ b/keyboards/crkbd/keymaps/soundmonster/glcdfont.c @@ -1,5 +1,3 @@ -#pragma once - #include "progmem.h" // Corne 8x6 font with QMK Firmware Logo diff --git a/keyboards/crkbd/lib/glcdfont.c b/keyboards/crkbd/lib/glcdfont.c index d1be2deba058..41041f12bb3f 100644 --- a/keyboards/crkbd/lib/glcdfont.c +++ b/keyboards/crkbd/lib/glcdfont.c @@ -1,8 +1,6 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#pragma once - #include "progmem.h" // Standard ASCII 5x7 font diff --git a/keyboards/handwired/owlet60/keymaps/oled_testing/customfont.c b/keyboards/handwired/owlet60/keymaps/oled_testing/customfont.c index 0f1fd9c1561d..181b073ab5f5 100644 --- a/keyboards/handwired/owlet60/keymaps/oled_testing/customfont.c +++ b/keyboards/handwired/owlet60/keymaps/oled_testing/customfont.c @@ -1,5 +1,3 @@ -#pragma once - #include "progmem.h" // Helidox 8x6 font with QMK Firmware Logo diff --git a/keyboards/helix/common/glcdfont.c b/keyboards/helix/common/glcdfont.c index 1cf75515bb3a..697d58886ec5 100644 --- a/keyboards/helix/common/glcdfont.c +++ b/keyboards/helix/common/glcdfont.c @@ -1,8 +1,6 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#pragma once - #include "progmem.h" // Standard ASCII 5x7 font diff --git a/keyboards/lily58/lib/glcdfont.c b/keyboards/lily58/lib/glcdfont.c index 6990816a536b..94f026ba971e 100644 --- a/keyboards/lily58/lib/glcdfont.c +++ b/keyboards/lily58/lib/glcdfont.c @@ -1,8 +1,6 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#pragma once - #include "progmem.h" // Standard ASCII 5x7 font diff --git a/keyboards/orthodox/common/glcdfont.c b/keyboards/orthodox/common/glcdfont.c index a0c97321402e..d607d34b7795 100644 --- a/keyboards/orthodox/common/glcdfont.c +++ b/keyboards/orthodox/common/glcdfont.c @@ -1,8 +1,6 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#pragma once - #include "progmem.h" // Standard ASCII 5x7 font diff --git a/keyboards/rgbkb/sol/common/glcdfont.c b/keyboards/rgbkb/sol/common/glcdfont.c index b8e66cba1f40..6b75af8483cb 100644 --- a/keyboards/rgbkb/sol/common/glcdfont.c +++ b/keyboards/rgbkb/sol/common/glcdfont.c @@ -1,5 +1,3 @@ -#pragma once - #include "progmem.h" // Helidox 8x6 font with RGBKB SOL Logo diff --git a/keyboards/rgbkb/zen/common/glcdfont.c b/keyboards/rgbkb/zen/common/glcdfont.c index 78a2536be75b..bc68c872969e 100644 --- a/keyboards/rgbkb/zen/common/glcdfont.c +++ b/keyboards/rgbkb/zen/common/glcdfont.c @@ -1,7 +1,5 @@ // This is the SOL 6x8 font -#pragma once - #include "progmem.h" static const unsigned char font[] PROGMEM = { diff --git a/keyboards/rgbkb/zygomorph/common/glcdfont.c b/keyboards/rgbkb/zygomorph/common/glcdfont.c index 1cf75515bb3a..697d58886ec5 100644 --- a/keyboards/rgbkb/zygomorph/common/glcdfont.c +++ b/keyboards/rgbkb/zygomorph/common/glcdfont.c @@ -1,8 +1,6 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#pragma once - #include "progmem.h" // Standard ASCII 5x7 font diff --git a/keyboards/treadstone48/common/glcdfont.c b/keyboards/treadstone48/common/glcdfont.c index 22fe8655d727..003ce1a87bde 100644 --- a/keyboards/treadstone48/common/glcdfont.c +++ b/keyboards/treadstone48/common/glcdfont.c @@ -1,8 +1,6 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#pragma once - #include "progmem.h" // Standard ASCII 5x7 font diff --git a/keyboards/uzu42/keymaps/default/glcdfont_uzu42.c b/keyboards/uzu42/keymaps/default/glcdfont_uzu42.c index 5ef5b0a51d9f..5c3fa80d70ba 100644 --- a/keyboards/uzu42/keymaps/default/glcdfont_uzu42.c +++ b/keyboards/uzu42/keymaps/default/glcdfont_uzu42.c @@ -1,8 +1,6 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#pragma once - #include "progmem.h" // Standard ASCII 5x7 font diff --git a/keyboards/yosino58/lib/glcdfont.c b/keyboards/yosino58/lib/glcdfont.c index b9f50cc44391..f393df33423d 100644 --- a/keyboards/yosino58/lib/glcdfont.c +++ b/keyboards/yosino58/lib/glcdfont.c @@ -1,8 +1,6 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#pragma once - #include "progmem.h" // Standard ASCII 5x7 font diff --git a/keyboards/yosino58/lib/glcdfont_.c b/keyboards/yosino58/lib/glcdfont_.c index 4fcc7923598b..ad7a564a6c0e 100644 --- a/keyboards/yosino58/lib/glcdfont_.c +++ b/keyboards/yosino58/lib/glcdfont_.c @@ -1,8 +1,6 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#pragma once - #include "progmem.h" // Standard ASCII 5x7 font diff --git a/users/tominabox1/doug.c b/users/tominabox1/doug.c index d1f92ecf30f8..fccb1bb6fd95 100644 --- a/users/tominabox1/doug.c +++ b/users/tominabox1/doug.c @@ -1,17 +1,7 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#ifndef FONT5X7_H -#define FONT5X7_H - -#ifdef __AVR__ - #include - #include -#elif defined(ESP8266) - #include -#else - #define PROGMEM -#endif +#include "progmem.h" // Standard ASCII 5x7 font const unsigned char font[] PROGMEM = { @@ -240,4 +230,3 @@ const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -#endif // FONT5X7_H From b8c29d328e2a38ff124bc33ad220c1d0e30da561 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 29 Feb 2020 04:39:25 +1100 Subject: [PATCH 3/3] Missed these --- keyboards/comet46/lib/keylogger.c | 8 +------- keyboards/gergo/keymaps/oled/glcdfont.c | 3 +-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/keyboards/comet46/lib/keylogger.c b/keyboards/comet46/lib/keylogger.c index 184f601095a1..a0abdd79abcf 100644 --- a/keyboards/comet46/lib/keylogger.c +++ b/keyboards/comet46/lib/keylogger.c @@ -1,11 +1,5 @@ #include - -#ifdef __AVR__ - #include - #include -#else - #define PROGMEM -#endif +#include "progmem.h" #define NUM_USB_HID_KEYCODES 255 #define LEN_KEYCODE_STR 4 diff --git a/keyboards/gergo/keymaps/oled/glcdfont.c b/keyboards/gergo/keymaps/oled/glcdfont.c index cf189e6e5a6d..687f1a6a92f6 100644 --- a/keyboards/gergo/keymaps/oled/glcdfont.c +++ b/keyboards/gergo/keymaps/oled/glcdfont.c @@ -1,7 +1,6 @@ // 'loveLain', 128x32px -#include -#include +#include "progmem.h" static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,