]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Move SSD1306 function declarations to header file
authorDanny Nguyen <danny@80pct.com>
Mon, 3 Apr 2017 17:04:34 +0000 (13:04 -0400)
committerDanny Nguyen <danny@80pct.com>
Mon, 3 Apr 2017 17:24:20 +0000 (13:24 -0400)
keyboards/lets_split/keymaps/OLED_sample/keymap.c
keyboards/lets_split/rev2/rev2.c
keyboards/lets_split/rev2/rev2.h
keyboards/lets_split/ssd1306.c
keyboards/lets_split/ssd1306.h [new file with mode: 0644]

index 072b825abed757653605a37ea7bd75871dca1f66..493ebcd3f2c3001c00ad83903e8c6dd16deb83a0 100644 (file)
@@ -6,6 +6,9 @@
 #ifdef AUDIO_ENABLE
   #include "audio.h"
 #endif
+#ifdef SSD1306OLED
+  #include "ssd1306.h"
+#endif
 
 extern keymap_config_t keymap_config;
 
index 8bfa171d01dd5f486193978824681d87b504dbc9..20a4c6be1ef3bfaf7e3e9bacd00f3c38715b77ea 100644 (file)
@@ -37,4 +37,3 @@ void shutdown_user(void) {
        stop_all_notes();
     #endif
 }
-
index 0603827e08b20170821e9d8899c53be640680e58..0c4e8e7de1205744db77cc86bf5bbf2defda24d5 100644 (file)
        #include <avr/io.h>
        #include <avr/interrupt.h>
 #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);
index 3c7816bb3277858d7758bfb4f920d5fb66c62cd4..76348ab7f2cbf16ca278e8497c8b474d5ddbb085 100644 (file)
@@ -1,8 +1,7 @@
+#include "ssd1306.h"
 #include "config.h"
 #include "i2c.h"
-#include <stdbool.h>
 #include <string.h>
-#include <stdio.h>
 #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 (file)
index 0000000..b0c74f9
--- /dev/null
@@ -0,0 +1,17 @@
+#ifndef SSD1306_H
+#define SSD1306_H
+
+#include <stdbool.h>
+#include <stdio.h>
+
+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