summaryrefslogtreecommitdiff
path: root/keyboards/amj60
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2020-11-17 17:06:30 +0000
committerGitHub <noreply@github.com>2020-11-17 17:06:30 +0000
commitddcb1794fa83e62e5e48536f4bc02ada63da411a (patch)
treedb5df8970f8ed22c77bdd021b781a429a5f05b49 /keyboards/amj60
parentadfd34c4512f6215a49a8f705ce408d6c82fb8cc (diff)
Refactor to use led config - Part 1 (#10905)
* Refactor to use led config * Refactor to use led config * Refactor to use led config * Refactor to use led config * Refactor to use led config
Diffstat (limited to 'keyboards/amj60')
-rw-r--r--keyboards/amj60/amj60.c29
-rw-r--r--keyboards/amj60/config.h8
2 files changed, 6 insertions, 31 deletions
diff --git a/keyboards/amj60/amj60.c b/keyboards/amj60/amj60.c
index 993a5917db..02aa116d54 100644
--- a/keyboards/amj60/amj60.c
+++ b/keyboards/amj60/amj60.c
@@ -1,30 +1 @@
#include "amj60.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
- DDRB |= (1<<2);
-}
-
-void led_set_kb(uint8_t usb_led) {
- if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
- // Turn capslock on
- PORTB &= ~(1<<2);
- } else {
- // Turn capslock off
- PORTB |= (1<<2);
- }
-}
diff --git a/keyboards/amj60/config.h b/keyboards/amj60/config.h
index 81b70111b1..79cfbe59e4 100644
--- a/keyboards/amj60/config.h
+++ b/keyboards/amj60/config.h
@@ -38,11 +38,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { F1, F0, E6, C7, C6, B0, D4, B1, B7, B5, B4, D7, D6, B3}
#define UNUSED_PINS
-#define BACKLIGHT_PIN B6
-
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
+#define LED_CAPS_LOCK_PIN B2
+#define LED_PIN_ON_STATE 0
+
+#define BACKLIGHT_PIN B6
+
+
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST