diff options
| author | Joel Challis <git@zvecr.com> | 2020-11-18 17:51:53 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-18 17:51:53 +0000 |
| commit | f00402a2f3d551bcb1fb87245238e2b392192eb5 (patch) | |
| tree | aad0bdc88a3fae31ac58cfdd62d99bac06dc67d0 /keyboards/exclusive | |
| parent | e1e13c53acb24c3617c3de88fa401acb3d628074 (diff) | |
| download | qmk_firmware-f00402a2f3d551bcb1fb87245238e2b392192eb5.tar.gz qmk_firmware-f00402a2f3d551bcb1fb87245238e2b392192eb5.zip | |
Refactor to use led config - Part 3 (#10966)
* Refactor to use led config
* Refactor to use led config
* Refactor to use led config
* Refactor to use led config
Diffstat (limited to 'keyboards/exclusive')
| -rw-r--r-- | keyboards/exclusive/e6v2/le/config.h | 3 | ||||
| -rw-r--r-- | keyboards/exclusive/e6v2/le/le.c | 32 | ||||
| -rw-r--r-- | keyboards/exclusive/e7v1/config.h | 2 | ||||
| -rw-r--r-- | keyboards/exclusive/e7v1/e7v1.c | 24 |
4 files changed, 5 insertions, 56 deletions
diff --git a/keyboards/exclusive/e6v2/le/config.h b/keyboards/exclusive/e6v2/le/config.h index 6477d5364..71bd66b15 100644 --- a/keyboards/exclusive/e6v2/le/config.h +++ b/keyboards/exclusive/e6v2/le/config.h | |||
| @@ -37,6 +37,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 37 | #define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 } | 37 | #define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 } |
| 38 | #define UNUSED_PINS | 38 | #define UNUSED_PINS |
| 39 | 39 | ||
| 40 | #define LED_CAPS_LOCK_PIN B7 | ||
| 41 | #define LED_PIN_ON_STATE 0 | ||
| 42 | |||
| 40 | #define RGB_DI_PIN E6 | 43 | #define RGB_DI_PIN E6 |
| 41 | #ifdef RGB_DI_PIN | 44 | #ifdef RGB_DI_PIN |
| 42 | #define RGBLIGHT_ANIMATIONS | 45 | #define RGBLIGHT_ANIMATIONS |
diff --git a/keyboards/exclusive/e6v2/le/le.c b/keyboards/exclusive/e6v2/le/le.c index f27bdc113..dd973feec 100644 --- a/keyboards/exclusive/e6v2/le/le.c +++ b/keyboards/exclusive/e6v2/le/le.c | |||
| @@ -1,33 +1 @@ | |||
| 1 | #include "le.h" | #include "le.h" | |
| 2 | |||
| 3 | void matrix_init_kb(void) { | ||
| 4 | // put your keyboard start-up code here | ||
| 5 | // runs once when the firmware starts up | ||
| 6 | |||
| 7 | matrix_init_user(); | ||
| 8 | } | ||
| 9 | |||
| 10 | void matrix_scan_kb(void) { | ||
| 11 | // put your looping keyboard code here | ||
| 12 | // runs every cycle (a lot) | ||
| 13 | |||
| 14 | matrix_scan_user(); | ||
| 15 | } | ||
| 16 | |||
| 17 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
| 18 | // put your per-action keyboard code here | ||
| 19 | // runs for every action, just before processing by the firmware | ||
| 20 | |||
| 21 | return process_record_user(keycode, record); | ||
| 22 | } | ||
| 23 | |||
| 24 | void led_set_user(uint8_t usb_led) { | ||
| 25 | if (usb_led & (1 << USB_LED_CAPS_LOCK)) { | ||
| 26 | DDRB |= (1 << 7); | ||
| 27 | PORTB &= ~(1 << 7); | ||
| 28 | } else { | ||
| 29 | DDRB &= ~(1 << 7); | ||
| 30 | PORTB &= ~(1 << 7); | ||
| 31 | } | ||
| 32 | } | ||
| 33 | |||
diff --git a/keyboards/exclusive/e7v1/config.h b/keyboards/exclusive/e7v1/config.h index c8f150125..11e47c360 100644 --- a/keyboards/exclusive/e7v1/config.h +++ b/keyboards/exclusive/e7v1/config.h | |||
| @@ -22,6 +22,8 @@ | |||
| 22 | /* COL2ROW or ROW2COL */ | 22 | /* COL2ROW or ROW2COL */ |
| 23 | #define DIODE_DIRECTION COL2ROW | 23 | #define DIODE_DIRECTION COL2ROW |
| 24 | 24 | ||
| 25 | #define LED_CAPS_LOCK_PIN F0 | ||
| 26 | |||
| 25 | /* number of backlight levels */ | 27 | /* number of backlight levels */ |
| 26 | #define BACKLIGHT_PIN B7 | 28 | #define BACKLIGHT_PIN B7 |
| 27 | #ifdef BACKLIGHT_PIN | 29 | #ifdef BACKLIGHT_PIN |
diff --git a/keyboards/exclusive/e7v1/e7v1.c b/keyboards/exclusive/e7v1/e7v1.c index 381585e6c..880121f4f 100644 --- a/keyboards/exclusive/e7v1/e7v1.c +++ b/keyboards/exclusive/e7v1/e7v1.c | |||
| @@ -1,25 +1 @@ | |||
| 1 | #include "e7v1.h" | #include "e7v1.h" | |
| 2 | |||
| 3 | void matrix_init_kb(void) { | ||
| 4 | setPinOutput(F0); | ||
| 5 | matrix_init_user(); | ||
| 6 | } | ||
| 7 | |||
| 8 | void matrix_scan_kb(void) { | ||
| 9 | matrix_scan_user(); | ||
| 10 | } | ||
| 11 | |||
| 12 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
| 13 | return process_record_user(keycode, record); | ||
| 14 | } | ||
| 15 | |||
| 16 | void led_set_kb(uint8_t usb_led) { | ||
| 17 | if (usb_led & (1 << USB_LED_CAPS_LOCK)) { | ||
| 18 | writePinHigh(F0); | ||
| 19 | } else { | ||
| 20 | writePinLow(F0); | ||
| 21 | } | ||
| 22 | |||
| 23 | led_set_user(usb_led); | ||
| 24 | } | ||
| 25 | |||
