From e3aeab356afd52299bf6cf05b5c99995ce167275 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Mon, 3 Apr 2017 13:04:34 -0400 Subject: [PATCH] Move SSD1306 function declarations to header file --- .../lets_split/keymaps/OLED_sample/keymap.c | 3 +++ keyboards/lets_split/rev2/rev2.c | 1 - keyboards/lets_split/rev2/rev2.h | 11 ----------- keyboards/lets_split/ssd1306.c | 3 +-- keyboards/lets_split/ssd1306.h | 17 +++++++++++++++++ 5 files changed, 21 insertions(+), 14 deletions(-) create mode 100644 keyboards/lets_split/ssd1306.h diff --git a/keyboards/lets_split/keymaps/OLED_sample/keymap.c b/keyboards/lets_split/keymaps/OLED_sample/keymap.c index 072b825a..493ebcd3 100644 --- a/keyboards/lets_split/keymaps/OLED_sample/keymap.c +++ b/keyboards/lets_split/keymaps/OLED_sample/keymap.c @@ -6,6 +6,9 @@ #ifdef AUDIO_ENABLE #include "audio.h" #endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif extern keymap_config_t keymap_config; diff --git a/keyboards/lets_split/rev2/rev2.c b/keyboards/lets_split/rev2/rev2.c index 8bfa171d..20a4c6be 100644 --- a/keyboards/lets_split/rev2/rev2.c +++ b/keyboards/lets_split/rev2/rev2.c @@ -37,4 +37,3 @@ void shutdown_user(void) { stop_all_notes(); #endif } - diff --git a/keyboards/lets_split/rev2/rev2.h b/keyboards/lets_split/rev2/rev2.h index 0603827e..0c4e8e7d 100644 --- a/keyboards/lets_split/rev2/rev2.h +++ b/keyboards/lets_split/rev2/rev2.h @@ -13,17 +13,6 @@ #include #include #endif -#ifdef SSD1306OLED - extern bool iota_gfx_init(void); - extern void iota_gfx_task(void); - extern bool iota_gfx_off(void); - extern bool iota_gfx_on(void); - extern void iota_gfx_flush(void); - extern void iota_gfx_write_char(uint8_t c); - extern void iota_gfx_write(const char *data); - extern void iota_gfx_write_P(const char *data); - extern void iota_gfx_clear_screen(void); -#endif #endif //void promicro_bootloader_jmp(bool program); diff --git a/keyboards/lets_split/ssd1306.c b/keyboards/lets_split/ssd1306.c index 3c7816bb..76348ab7 100644 --- a/keyboards/lets_split/ssd1306.c +++ b/keyboards/lets_split/ssd1306.c @@ -1,8 +1,7 @@ +#include "ssd1306.h" #include "config.h" #include "i2c.h" -#include #include -#include #include "print.h" #include "lets_split.h" #include "common/glcdfont.c" diff --git a/keyboards/lets_split/ssd1306.h b/keyboards/lets_split/ssd1306.h new file mode 100644 index 00000000..b0c74f98 --- /dev/null +++ b/keyboards/lets_split/ssd1306.h @@ -0,0 +1,17 @@ +#ifndef SSD1306_H +#define SSD1306_H + +#include +#include + +bool iota_gfx_init(void); +void iota_gfx_task(void); +bool iota_gfx_off(void); +bool iota_gfx_on(void); +void iota_gfx_flush(void); +void iota_gfx_write_char(uint8_t c); +void iota_gfx_write(const char *data); +void iota_gfx_write_P(const char *data); +void iota_gfx_clear_screen(void); + +#endif