Browse Source

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
pull/10975/head
Joel Challis 3 years ago
committed by GitHub
parent
commit
f00402a2f3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 54 additions and 546 deletions
  1. +6
    -0
      keyboards/1upkeyboards/sweet16/v1/config.h
  2. +0
    -20
      keyboards/1upkeyboards/sweet16/v1/v1.c
  3. +0
    -20
      keyboards/alps64/alps64.c
  4. +2
    -0
      keyboards/alps64/config.h
  5. +0
    -29
      keyboards/amjpad/amjpad.c
  6. +3
    -0
      keyboards/amjpad/config.h
  7. +3
    -0
      keyboards/exclusive/e6v2/le/config.h
  8. +0
    -32
      keyboards/exclusive/e6v2/le/le.c
  9. +2
    -0
      keyboards/exclusive/e7v1/config.h
  10. +0
    -24
      keyboards/exclusive/e7v1/e7v1.c
  11. +4
    -1
      keyboards/fc980c/config.h
  12. +0
    -37
      keyboards/fc980c/fc980c.c
  13. +3
    -0
      keyboards/foxlab/leaf60/hotswap/config.h
  14. +0
    -43
      keyboards/foxlab/leaf60/hotswap/hotswap.c
  15. +3
    -0
      keyboards/foxlab/leaf60/universal/config.h
  16. +0
    -45
      keyboards/foxlab/leaf60/universal/universal.c
  17. +5
    -0
      keyboards/hineybush/hineyg80/config.h
  18. +0
    -47
      keyboards/hineybush/hineyg80/hineyg80.c
  19. +3
    -0
      keyboards/jc65/v32u4/config.h
  20. +0
    -35
      keyboards/jc65/v32u4/v32u4.c
  21. +4
    -0
      keyboards/kmac/config.h
  22. +0
    -53
      keyboards/kmac/kmac.c
  23. +5
    -0
      keyboards/melody96/config.h
  24. +0
    -22
      keyboards/melody96/melody96.c
  25. +4
    -0
      keyboards/peiorisboards/ixora/config.h
  26. +0
    -42
      keyboards/peiorisboards/ixora/ixora.c
  27. +3
    -4
      keyboards/redscarf_iiplus/verb/config.h
  28. +0
    -35
      keyboards/redscarf_iiplus/verb/verb.c
  29. +4
    -0
      keyboards/sck/osa/config.h
  30. +0
    -57
      keyboards/sck/osa/osa.c

+ 6
- 0
keyboards/1upkeyboards/sweet16/v1/config.h View File

@ -17,6 +17,12 @@
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
#ifndef CONVERT_TO_PROTON_C
# define LED_NUM_LOCK_PIN B0 // RXLED
# define LED_CAPS_LOCK_PIN D5 // TXLED
# define LED_PIN_ON_STATE 0
#endif
/* Underglow options */
#define RGB_DI_PIN B1
#ifdef RGB_DI_PIN


+ 0
- 20
keyboards/1upkeyboards/sweet16/v1/v1.c View File

@ -1,21 +1 @@
#include "v1.h"
void led_set_kb(uint8_t usb_led) {
#ifndef CONVERT_TO_PROTON_C
/* Map RXLED to USB_LED_NUM_LOCK */
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
setPinOutput(B0);
writePinLow(B0);
} else {
setPinInput(B0);
}
/* Map TXLED to USB_LED_CAPS_LOCK */
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
setPinOutput(D5);
writePinLow(D5);
} else {
setPinInput(D5);
}
#endif
}

+ 0
- 20
keyboards/alps64/alps64.c View File

@ -15,23 +15,3 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "alps64.h"
void keyboard_pre_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
setPinOutput(C5);
keyboard_pre_init_user();
}
void led_set_kb(uint8_t usb_led)
{
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
// output high
writePinHigh(C5);
} else {
// Hi-Z
writePinLow(C5);
}
led_set_user(usb_led);
}

+ 2
- 0
keyboards/alps64/config.h View File

@ -37,6 +37,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
#define LED_CAPS_LOCK_PIN C5
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST


+ 0
- 29
keyboards/amjpad/amjpad.c View File

@ -1,30 +1 @@
#include "amjpad.h"
#include "led.h"
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
led_init_ports();
};
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
};
void led_init_ports(void) {
// * Set our LED pins as output
DDRD |= (1<<6);
}
void led_set_kb(uint8_t usb_led) {
if (usb_led & (1<<USB_LED_NUM_LOCK)) {
// Turn numlock on
PORTD &= ~(1<<6);
} else {
// Turn numlock off
PORTD |= (1<<6);
}
}

+ 3
- 0
keyboards/amjpad/config.h View File

@ -54,6 +54,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
#define LED_NUM_LOCK_PIN D6
#define LED_PIN_ON_STATE 0
/* Backlight configuration
*/
#define BACKLIGHT_LEVELS 4


+ 3
- 0
keyboards/exclusive/e6v2/le/config.h View File

@ -37,6 +37,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 }
#define UNUSED_PINS
#define LED_CAPS_LOCK_PIN B7
#define LED_PIN_ON_STATE 0
#define RGB_DI_PIN E6
#ifdef RGB_DI_PIN
#define RGBLIGHT_ANIMATIONS


+ 0
- 32
keyboards/exclusive/e6v2/le/le.c View File

@ -1,33 +1 @@
#include "le.h"
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
}
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
}
void led_set_user(uint8_t usb_led) {
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
DDRB |= (1 << 7);
PORTB &= ~(1 << 7);
} else {
DDRB &= ~(1 << 7);
PORTB &= ~(1 << 7);
}
}

+ 2
- 0
keyboards/exclusive/e7v1/config.h View File

@ -22,6 +22,8 @@
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
#define LED_CAPS_LOCK_PIN F0
/* number of backlight levels */
#define BACKLIGHT_PIN B7
#ifdef BACKLIGHT_PIN


+ 0
- 24
keyboards/exclusive/e7v1/e7v1.c View File

@ -1,25 +1 @@
#include "e7v1.h"
void matrix_init_kb(void) {
setPinOutput(F0);
matrix_init_user();
}
void matrix_scan_kb(void) {
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return process_record_user(keycode, record);
}
void led_set_kb(uint8_t usb_led) {
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
writePinHigh(F0);
} else {
writePinLow(F0);
}
led_set_user(usb_led);
}

+ 4
- 1
keyboards/fc980c/config.h View File

@ -49,7 +49,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 0
#define TAPPING_TERM 175
#define LED_NUM_LOCK_PIN B4
#define LED_CAPS_LOCK_PIN B5
#define LED_SCROLL_LOCK_PIN B6
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
// #define LOCKING_SUPPORT_ENABLE


+ 0
- 37
keyboards/fc980c/fc980c.c View File

@ -22,46 +22,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
#ifdef ACTUATION_DEPTH_ADJUSTMENT
adjust_actuation_point(ACTUATION_DEPTH_ADJUSTMENT);
#endif
matrix_init_user();
}
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
}
void led_set_kb(uint8_t usb_led) {
if (usb_led & (1<<USB_LED_NUM_LOCK)) {
PORTB |= (1<<4);
} else {
PORTB &= ~(1<<4);
}
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
PORTB |= (1<<5);
} else {
PORTB &= ~(1<<5);
}
if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
PORTB |= (1<<6);
} else {
PORTB &= ~(1<<6);
}
led_set_user(usb_led);
}

+ 3
- 0
keyboards/foxlab/leaf60/hotswap/config.h View File

@ -48,6 +48,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
#define LED_CAPS_LOCK_PIN E6
#define LED_PIN_ON_STATE 0
#define BACKLIGHT_PIN B7
#define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 4


+ 0
- 43
keyboards/foxlab/leaf60/hotswap/hotswap.c View File

@ -14,46 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "hotswap.h"
// Optional override functions below.
// You can leave any or all of these undefined.
// These are only required if you want to perform custom actions.
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
setPinOutput(E6);
matrix_init_user();
}
/*
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
}
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
led_set_user(usb_led);
}
*/
void led_set_kb(uint8_t usb_led) {
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
writePinLow(E6);
} else {
writePinHigh(E6);
}
led_set_user(usb_led);
}

+ 3
- 0
keyboards/foxlab/leaf60/universal/config.h View File

@ -48,6 +48,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
#define LED_CAPS_LOCK_PIN E6
#define LED_PIN_ON_STATE 0
#define BACKLIGHT_PIN B7
#define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 3


+ 0
- 45
keyboards/foxlab/leaf60/universal/universal.c View File

@ -14,48 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "universal.h"
// Optional override functions below.
// You can leave any or all of these undefined.
// These are only required if you want to perform custom actions.
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
setPinOutput(E6);
matrix_init_user();
}
/*
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
}
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
led_set_user(usb_led);
}
*/
void led_set_kb(uint8_t usb_led) {
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
writePinLow(E6);
} else {
writePinHigh(E6);
}
led_set_user(usb_led);
}

+ 5
- 0
keyboards/hineybush/hineyg80/config.h View File

@ -22,6 +22,11 @@
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
#define LED_NUM_LOCK_PIN C6
#define LED_CAPS_LOCK_PIN B6
#define LED_SCROLL_LOCK_PIN B5
/* number of backlight levels */
#ifdef BACKLIGHT_PIN


+ 0
- 47
keyboards/hineybush/hineyg80/hineyg80.c View File

@ -14,50 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "hineyg80.h"
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
}
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
}
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
// Turn numlock on
writePinHigh(C6);
} else {
// Turn numlock off
writePinLow(C6);
}
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
// Turn capslock on
writePinHigh(B6);
} else {
// Turn capslock off
writePinLow(B6);
}
if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
// Turn scrolllock on
writePinHigh(B5);
} else {
// Turn scrolllock off
writePinLow(B5);
}
led_set_user(usb_led);
}

+ 3
- 0
keyboards/jc65/v32u4/config.h View File

@ -37,6 +37,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4, F5 }
#define UNUSED_PINS
#define LED_CAPS_LOCK_PIN B2
#define LED_PIN_ON_STATE 0
#define RGB_DI_PIN E2
#ifdef RGB_DI_PIN
#define RGBLIGHT_ANIMATIONS


+ 0
- 35
keyboards/jc65/v32u4/v32u4.c View File

@ -1,36 +1 @@
#include "v32u4.h"
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
}
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
}
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
// output low
DDRB |= (1<<2);
PORTB &= ~(1<<2);
} else {
// Hi-Z
DDRB &= ~(1<<2);
PORTB &= ~(1<<2);
}
led_set_user(usb_led);
}

+ 4
- 0
keyboards/kmac/config.h View File

@ -45,6 +45,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL*/
//#define DIODE_DIRECTION
#define LED_CAPS_LOCK_PIN B0
#define LED_SCROLL_LOCK_PIN E6
#define LED_PIN_ON_STATE 0
/* number of backlight levels */
//#define BACKLIGHT_LEVELS 3
// #define BACKLIGHT_PIN B7


+ 0
- 53
keyboards/kmac/kmac.c View File

@ -15,62 +15,9 @@
*/
#include "kmac.h"
#define CAPS_PIN B0
#define SCROLL_PIN E6
#define F_ROW_MASK 0b01
#define WASD_MASK 0b10
// Optional override functions below.
// You can leave any or all of these undefined.
// These are only required if you want to perform custom actions.
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
setPinOutput(CAPS_PIN);
setPinOutput(SCROLL_PIN);
matrix_init_user();
}
/*
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
}
*/
/* LED pin configuration
* Scroll Lock: Low PE6
* Caps Lock: Low PB0
*/
void led_set_kb(uint8_t usb_led) {
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
writePinLow(CAPS_PIN);
} else {
writePinHigh(CAPS_PIN);
}
if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
writePinLow(SCROLL_PIN);
} else {
writePinHigh(SCROLL_PIN);
}
led_set_user(usb_led);
}
void backlight_init_ports(void) {
setPinOutput(B1);
setPinOutput(B2);


+ 5
- 0
keyboards/melody96/config.h View File

@ -22,6 +22,11 @@
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION ROW2COL
#define LED_NUM_LOCK_PIN C6
#define LED_CAPS_LOCK_PIN C7
#define LED_SCROLL_LOCK_PIN B5
#define LED_PIN_ON_STATE 0
/* number of backlight levels */
#define BACKLIGHT_PIN B6
#ifdef BACKLIGHT_PIN


+ 0
- 22
keyboards/melody96/melody96.c View File

@ -1,23 +1 @@
#include "melody96.h"
void led_set_kb(uint8_t usb_led) {
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
DDRC |= (1 << 6); PORTC &= ~(1 << 6);
} else {
DDRC &= ~(1 << 6); PORTC &= ~(1 << 6);
}
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
DDRC |= (1 << 7); PORTC &= ~(1 << 7);
} else {
DDRC &= ~(1 << 7); PORTC &= ~(1 << 7);
}
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
DDRB |= (1 << 5); PORTB &= ~(1 << 5);
} else {
DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
}
led_set_user(usb_led);
}

+ 4
- 0
keyboards/peiorisboards/ixora/config.h View File

@ -22,3 +22,7 @@
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 0
#define LED_NUM_LOCK_PIN A9
#define LED_CAPS_LOCK_PIN A10
#define LED_SCROLL_LOCK_PIN A8

+ 0
- 42
keyboards/peiorisboards/ixora/ixora.c View File

@ -1,43 +1 @@
#include "ixora.h"
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
setPinOutput(A8);
setPinOutput(A9);
setPinOutput(A10);
writePinLow(A8);
writePinLow(A9);
writePinLow(A10);
matrix_init_user();
}
void matrix_scan_kb(void) {
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return process_record_user(keycode, record);
}
void led_set_kb(uint8_t usb_led) {
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
writePinHigh(A10);
} else {
writePinLow(A10);
}
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
writePinHigh(A9);
} else {
writePinLow(A9);
}
if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
writePinHigh(A8);
} else {
writePinLow(A8);
}
led_set_user(usb_led);
}

+ 3
- 4
keyboards/redscarf_iiplus/verb/config.h View File

@ -49,10 +49,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
/*
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
*/
//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
#define LED_NUM_LOCK_PIN E6
#define LED_CAPS_LOCK_PIN C7
#define LED_PIN_ON_STATE 0
#define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING


+ 0
- 35
keyboards/redscarf_iiplus/verb/verb.c View File

@ -14,38 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "verb.h"
// Optional override functions below.
// You can leave any or all of these undefined.
// These are only required if you want to perform custom actions.
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
led_init_ports();
}
void led_init_ports(void) {
setPinOutput(C7);
setPinOutput(E6);
}
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
writePinLow(C7);
} else {
writePinHigh(C7);
}
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
writePinLow(E6);
} else {
writePinHigh(E6);
}
led_set_user(usb_led);
}

+ 4
- 0
keyboards/sck/osa/config.h View File

@ -91,6 +91,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST
#define LED_NUM_LOCK_PIN C7
#define LED_CAPS_LOCK_PIN C6
#define LED_SCROLL_LOCK_PIN B6
/* number of backlight levels */
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */


+ 0
- 57
keyboards/sck/osa/osa.c View File

@ -14,60 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "osa.h"
// Optional override functions below.
// You can leave any or all of these undefined.
// These are only required if you want to perform custom actions.
/*
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
}
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
}
*/
void matrix_init_board(void){
setPinOutput(C7);
setPinOutput(C6);
setPinOutput(B6);
}
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
writePinHigh(C7);
} else {
writePinLow(C7);
}
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
writePinHigh(C6);
} else {
writePinLow(C6);
}
if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
writePinHigh(B6);
} else {
writePinLow(B6);
}
led_set_user(usb_led);
}

Loading…
Cancel
Save