Merge pull request #46 from zsa/fix/oled_driver_for_splits

Fix issuse with OLED Driver and Split Keyboard code
pull/5990/head
Florian Didron 6 years ago committed by GitHub
commit 24d05fee49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -16,4 +16,5 @@
05-05-2019 - New keycode macro (XP) for shifted character pairs using UNICODEMAP, and bugfixes/improvements
05-05-2019 - Add `LINK_TIME_OPTIMIZATION_ENABLE` to enable LTO and disable problematic features that cause LTO to fail
05-05-2019 - Fix issue with Space Cadet
05-06-2019 - Changes to Split Common and OLED code
05-16-2019 - Add RGB Light Effect Range functionality

@ -247,12 +247,6 @@ 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.
@ -976,9 +970,6 @@ void matrix_init_quantum() {
#ifdef OUTPUT_AUTO_ENABLE
set_output(OUTPUT_AUTO);
#endif
#ifdef OLED_DRIVER_ENABLE
oled_init(OLED_ROTATION_0);
#endif
matrix_init_kb();
}
@ -1015,10 +1006,6 @@ void matrix_scan_quantum() {
haptic_task();
#endif
#ifdef OLED_DRIVER_ENABLE
oled_task();
#endif
matrix_scan_kb();
}
#if defined(BACKLIGHT_ENABLE) && defined(BACKLIGHT_PIN)
@ -1109,9 +1096,7 @@ void backlight_task(void) {
#endif
#endif
#else // pwm through timer
#define TIMER_TOP 0xFFFFU
// See http://jared.geek.nz/2013/feb/linear-led-pwm
static uint16_t cie_lightness(uint16_t v) {
@ -1158,7 +1143,6 @@ void backlight_task(void) {}
#define BREATHING_NO_HALT 0
#define BREATHING_HALT_OFF 1
#define BREATHING_HALT_ON 2
#define BREATHING_STEPS 128
static uint8_t breathing_period = BREATHING_PERIOD;

@ -299,7 +299,7 @@ uint8_t _matrix_scan(void) {
debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, changed);
return 1;
return (uint8_t)changed;
}
uint8_t matrix_scan(void) {

@ -75,6 +75,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef QWIIC_ENABLE
# include "qwiic.h"
#endif
#ifdef OLED_DRIVER_ENABLE
#include "oled_driver.h"
#endif
#ifdef VELOCIKEY_ENABLE
#include "velocikey.h"
#endif
@ -205,6 +208,9 @@ void keyboard_init(void) {
#ifdef QWIIC_ENABLE
qwiic_init();
#endif
#ifdef OLED_DRIVER_ENABLE
oled_init(OLED_ROTATION_0);
#endif
#ifdef PS2_MOUSE_ENABLE
ps2_mouse_init();
#endif
@ -262,7 +268,11 @@ void keyboard_task(void)
uint8_t keys_processed = 0;
#endif
#if defined(OLED_DRIVER_ENABLE) && !defined(OLED_DISABLE_TIMEOUT)
uint8_t ret = matrix_scan();
#else
matrix_scan();
#endif
if (is_keyboard_master()) {
for (uint8_t r = 0; r < MATRIX_ROWS; r++) {
@ -306,6 +316,15 @@ MATRIX_LOOP_END:
qwiic_task();
#endif
#ifdef OLED_DRIVER_ENABLE
oled_task();
#ifndef OLED_DISABLE_TIMEOUT
// Wake up oled if user is using those fabulous keys!
if (ret)
oled_on();
#endif
#endif
#ifdef MOUSEKEY_ENABLE
// mousekey repeat & acceleration
mousekey_task();

Loading…
Cancel
Save