diff options
| author | Jack Humbert <jack.humb@gmail.com> | 2018-10-26 16:19:23 -0400 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2018-10-26 14:24:13 -0700 |
| commit | 85688e5b52112c86895171d3dc8b26610480e932 (patch) | |
| tree | 03f3f7bf585ebdf158576aeb6a8cf0c8c5319d6f /quantum/quantum.c | |
| parent | e22c3992454ade93ccaef70ab077e79a4b2a5ef0 (diff) | |
| download | qmk_firmware-85688e5b52112c86895171d3dc8b26610480e932.tar.gz qmk_firmware-85688e5b52112c86895171d3dc8b26610480e932.zip | |
add support for encoders to core
Diffstat (limited to 'quantum/quantum.c')
| -rw-r--r-- | quantum/quantum.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c index eed59f811..c9bec6740 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c | |||
| @@ -42,6 +42,11 @@ extern backlight_config_t backlight_config; | |||
| 42 | #include "process_midi.h" | 42 | #include "process_midi.h" |
| 43 | #endif | 43 | #endif |
| 44 | 44 | ||
| 45 | |||
| 46 | #ifdef ENCODER_ENABLE | ||
| 47 | #include "encoder.h" | ||
| 48 | #endif | ||
| 49 | |||
| 45 | #ifdef AUDIO_ENABLE | 50 | #ifdef AUDIO_ENABLE |
| 46 | #ifndef GOODBYE_SONG | 51 | #ifndef GOODBYE_SONG |
| 47 | #define GOODBYE_SONG SONG(GOODBYE_SOUND) | 52 | #define GOODBYE_SONG SONG(GOODBYE_SOUND) |
| @@ -957,6 +962,9 @@ void matrix_init_quantum() { | |||
| 957 | #ifdef RGB_MATRIX_ENABLE | 962 | #ifdef RGB_MATRIX_ENABLE |
| 958 | rgb_matrix_init(); | 963 | rgb_matrix_init(); |
| 959 | #endif | 964 | #endif |
| 965 | #ifdef ENCODER_ENABLE | ||
| 966 | encoder_init(); | ||
| 967 | #endif | ||
| 960 | matrix_init_kb(); | 968 | matrix_init_kb(); |
| 961 | } | 969 | } |
| 962 | 970 | ||
| @@ -991,6 +999,10 @@ void matrix_scan_quantum() { | |||
| 991 | rgb_matrix_task_counter = ((rgb_matrix_task_counter + 1) % (RGB_MATRIX_SKIP_FRAMES + 1)); | 999 | rgb_matrix_task_counter = ((rgb_matrix_task_counter + 1) % (RGB_MATRIX_SKIP_FRAMES + 1)); |
| 992 | #endif | 1000 | #endif |
| 993 | 1001 | ||
| 1002 | #ifdef ENCODER_ENABLE | ||
| 1003 | encoder_read(); | ||
| 1004 | #endif | ||
| 1005 | |||
| 994 | matrix_scan_kb(); | 1006 | matrix_scan_kb(); |
| 995 | } | 1007 | } |
| 996 | #if defined(BACKLIGHT_ENABLE) && defined(BACKLIGHT_PIN) | 1008 | #if defined(BACKLIGHT_ENABLE) && defined(BACKLIGHT_PIN) |
