diff options
| author | Jack Humbert <jack.humb@gmail.com> | 2016-06-23 22:18:20 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-06-23 22:18:20 -0400 |
| commit | 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b (patch) | |
| tree | 2777e5c95bad3f5a9773fc58524a6ad99df63738 /quantum/quantum.h | |
| parent | ba116ceb496011bb35ce074a3ba8c2448f059260 (diff) | |
| download | qmk_firmware-13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b.tar.gz qmk_firmware-13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b.zip | |
Backlight abstraction and other changes (#439)
* redoes matrix pins, abstracts backlight code for B5,6,7
* slimming down keyboard stuff, backlight breathing implemented
* don't call backlight init when no pin
* cleans up user/kb/quantum calls, keyboard files
* fix pvc atomic
* replaces CHANNEL with correct var in breathing
* removes .hexs, updates readmes, updates template
* cleans-up clueboards, readmes to lowercase
* updates readme
Diffstat (limited to 'quantum/quantum.h')
| -rw-r--r-- | quantum/quantum.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/quantum/quantum.h b/quantum/quantum.h index 1f78f3717..7795294d5 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h | |||
| @@ -27,6 +27,10 @@ | |||
| 27 | #include <util/delay.h> | 27 | #include <util/delay.h> |
| 28 | #include "bootloader.h" | 28 | #include "bootloader.h" |
| 29 | #include "timer.h" | 29 | #include "timer.h" |
| 30 | #include "config_common.h" | ||
| 31 | #include <avr/interrupt.h> | ||
| 32 | #include "led.h" | ||
| 33 | #include "action_util.h" | ||
| 30 | 34 | ||
| 31 | extern uint32_t default_layer_state; | 35 | extern uint32_t default_layer_state; |
| 32 | 36 | ||
| @@ -74,6 +78,8 @@ void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3); | |||
| 74 | 78 | ||
| 75 | void matrix_init_kb(void); | 79 | void matrix_init_kb(void); |
| 76 | void matrix_scan_kb(void); | 80 | void matrix_scan_kb(void); |
| 81 | void matrix_init_user(void); | ||
| 82 | void matrix_scan_user(void); | ||
| 77 | bool process_action_kb(keyrecord_t *record); | 83 | bool process_action_kb(keyrecord_t *record); |
| 78 | bool process_record_kb(uint16_t keycode, keyrecord_t *record); | 84 | bool process_record_kb(uint16_t keycode, keyrecord_t *record); |
| 79 | bool process_record_user(uint16_t keycode, keyrecord_t *record); | 85 | bool process_record_user(uint16_t keycode, keyrecord_t *record); |
| @@ -89,4 +95,28 @@ void audio_on_user(void); | |||
| 89 | void music_on_user(void); | 95 | void music_on_user(void); |
| 90 | void music_scale_user(void); | 96 | void music_scale_user(void); |
| 91 | 97 | ||
| 98 | #ifdef BACKLIGHT_ENABLE | ||
| 99 | void backlight_init_ports(void); | ||
| 100 | |||
| 101 | #ifdef BACKLIGHT_BREATHING | ||
| 102 | void breathing_enable(void); | ||
| 103 | void breathing_pulse(void); | ||
| 104 | void breathing_disable(void); | ||
| 105 | void breathing_self_disable(void); | ||
| 106 | void breathing_toggle(void); | ||
| 107 | bool is_breathing(void); | ||
| 108 | |||
| 109 | void breathing_defaults(void); | ||
| 110 | void breathing_intensity_default(void); | ||
| 111 | void breathing_speed_default(void); | ||
| 112 | void breathing_speed_set(uint8_t value); | ||
| 113 | void breathing_speed_inc(uint8_t value); | ||
| 114 | void breathing_speed_dec(uint8_t value); | ||
| 115 | #endif | ||
| 116 | |||
| 117 | #endif | ||
| 118 | |||
| 119 | void led_set_user(uint8_t usb_led); | ||
| 120 | void led_set_kb(uint8_t usb_led); | ||
| 121 | |||
| 92 | #endif | 122 | #endif |
