summaryrefslogtreecommitdiff
path: root/keyboards/lets_split/rev2
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2017-03-28 09:13:41 -0400
committerGitHub <noreply@github.com>2017-03-28 09:13:41 -0400
commit8a0cf32cf557ce59f6cf81ded80dfa5afbdb61b2 (patch)
tree6f223cfb5dd7b6f0a347d479dd339ca2ec015f20 /keyboards/lets_split/rev2
parent0f986a195183b2f1c38d2e607229657282574752 (diff)
parent2573e581a52d88e0722f33e6137e37a018ac0b25 (diff)
Merge pull request #1171 from ishtob/master
SSD1306 I2C OLED display support for let's split
Diffstat (limited to 'keyboards/lets_split/rev2')
-rw-r--r--keyboards/lets_split/rev2/rev2.c8
-rw-r--r--keyboards/lets_split/rev2/rev2.h59
2 files changed, 59 insertions, 8 deletions
diff --git a/keyboards/lets_split/rev2/rev2.c b/keyboards/lets_split/rev2/rev2.c
index c505d3a6e3..8bfa171d01 100644
--- a/keyboards/lets_split/rev2/rev2.c
+++ b/keyboards/lets_split/rev2/rev2.c
@@ -5,6 +5,13 @@
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif
+#ifdef SSD1306OLED
+void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+ led_set_user(usb_led);
+}
+#endif
+
void matrix_init_kb(void) {
#ifdef AUDIO_ENABLE
@@ -30,3 +37,4 @@ 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 990976de2b..054731366e 100644
--- a/keyboards/lets_split/rev2/rev2.h
+++ b/keyboards/lets_split/rev2/rev2.h
@@ -6,23 +6,66 @@
//void promicro_bootloader_jmp(bool program);
#include "quantum.h"
+
+#ifdef USE_I2C
+#include <stddef.h>
+#ifdef __AVR__
+#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);
+#ifndef FLIP_HALF
+//Standard Keymap
#define KEYMAP( \
- k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \
- k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \
- k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \
- k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \
+ k40, k41, k42, k43, k44, k45, k05, k04, k03, k02, k01, k00, \
+ k50, k51, k52, k53, k54, k55, k15, k14, k13, k12, k11, k10, \
+ k60, k61, k62, k63, k64, k65, k25, k24, k23, k22, k21, k20, \
+ k70, k71, k72, k73, k74, k75, k35, k34, k33, k32, k31, k30 \
+ ) \
+ { \
+ { k45, k44, k43, k42, k41, k40 }, \
+ { k55, k54, k53, k52, k51, k50 }, \
+ { k65, k64, k63, k62, k61, k60 }, \
+ { k75, k74, k73, k72, k71, k70 }, \
+ { k00, k01, k02, k03, k04, k05 }, \
+ { k10, k11, k12, k13, k14, k15 }, \
+ { k20, k21, k22, k23, k24, k25 }, \
+ { k30, k31, k32, k33, k34, k35 } \
+ }
+
+#else
+// Keymap with one side flipped
+#define KEYMAP( \
+ k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \
+ k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \
+ k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \
+ k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \
) \
{ \
{ k00, k01, k02, k03, k04, k05 }, \
{ k10, k11, k12, k13, k14, k15 }, \
{ k20, k21, k22, k23, k24, k25 }, \
{ k30, k31, k32, k33, k34, k35 }, \
- { k40, k41, k42, k43, k44, k45 }, \
- { k50, k51, k52, k53, k54, k55 }, \
- { k60, k61, k62, k63, k64, k65 }, \
- { k70, k71, k72, k73, k74, k75 } \
+ { k45, k44, k43, k42, k41, k40 }, \
+ { k55, k54, k53, k52, k51, k50 }, \
+ { k65, k64, k63, k62, k61, k60 }, \
+ { k75, k74, k73, k72, k71, k70 } \
}
+#endif
+
#endif \ No newline at end of file