瀏覽代碼

Move SSD1306 function declarations to header file

Danny Nguyen 8 年之前
父節點
當前提交
e3aeab356a

+ 3 - 0
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;
 

+ 0 - 1
keyboards/lets_split/rev2/rev2.c

@@ -37,4 +37,3 @@ void shutdown_user(void) {
 	stop_all_notes();
     #endif
 }
-

+ 0 - 11
keyboards/lets_split/rev2/rev2.h

@@ -13,17 +13,6 @@
 	#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);

+ 1 - 2
keyboards/lets_split/ssd1306.c

@@ -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"

+ 17 - 0
keyboards/lets_split/ssd1306.h

@@ -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