diff options
author | Ryan Caltabiano <rcalt2vt@gmail.com> | 2019-04-15 22:32:57 -0500 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-04-22 09:55:39 -0700 |
commit | 95f8ac3424871c1ffed11e51f5fba66a192daeb0 (patch) | |
tree | c24fdff8dd91915679ecf8e5d1537698bc883275 /quantum | |
parent | 0a04a0e4191419455fadfeadaaec6696d9dea890 (diff) |
OLED Driver Feature
Diffstat (limited to 'quantum')
-rw-r--r-- | quantum/quantum.c | 16 | ||||
-rw-r--r-- | quantum/quantum.h | 4 |
2 files changed, 20 insertions, 0 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c index 4d8d2482d0..86dc00381e 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -275,6 +275,12 @@ bool process_record_quantum(keyrecord_t *record) { preprocess_tap_dance(keycode, record); #endif + #if defined(OLED_DRIVER_ENABLE) && !defined(OLED_DISABLE_TIMEOUT) + // Wake up oled if user is using those fabulous keys! + if (record->event.pressed) + oled_on(); + #endif + if (!( #if defined(KEY_LOCK_ENABLE) // Must run first to be able to mask key_up events. @@ -1084,6 +1090,12 @@ void matrix_init_quantum() { #ifdef HAPTIC_ENABLE haptic_init(); #endif + #ifdef OUTPUT_AUTO_ENABLE + set_output(OUTPUT_AUTO); + #endif + #ifdef OLED_DRIVER_ENABLE + oled_init(OLED_ROTATION_0); + #endif matrix_init_kb(); } @@ -1120,6 +1132,10 @@ void matrix_scan_quantum() { haptic_task(); #endif + #ifdef OLED_DRIVER_ENABLE + oled_task(); + #endif + matrix_scan_kb(); } #if defined(BACKLIGHT_ENABLE) && defined(BACKLIGHT_PIN) diff --git a/quantum/quantum.h b/quantum/quantum.h index e2f467125e..987516dedb 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -139,6 +139,10 @@ extern uint32_t default_layer_state; #include "haptic.h" #endif +#ifdef OLED_DRIVER_ENABLE + #include "oled_driver.h" +#endif + //Function substitutions to ease GPIO manipulation #ifdef __AVR__ #define PIN_ADDRESS(p, offset) _SFR_IO8(ADDRESS_BASE + (p >> PORT_SHIFTER) + offset) |