summaryrefslogtreecommitdiff
path: root/keyboards/evyd13
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2021-03-10 22:48:18 +0000
committerGitHub <noreply@github.com>2021-03-10 22:48:18 +0000
commit790f94533c936409e6be56e8b638969b42350180 (patch)
tree9da39389c6565e8755a9075be6c4fee95e6028af /keyboards/evyd13
parent9089244db77d724f23ddfc01be370f9c029c8e6c (diff)
Refactor to use led config - Part 6 (#12115)
* Convert to config * Convert to config * Convert to config * Convert to config * Convert to config * Convert to config * Convert to config * Convert to config * revert changes
Diffstat (limited to 'keyboards/evyd13')
-rw-r--r--keyboards/evyd13/eon75/config.h5
-rw-r--r--keyboards/evyd13/eon75/eon75.c29
-rw-r--r--keyboards/evyd13/eon95/config.h5
-rw-r--r--keyboards/evyd13/eon95/eon95.c29
-rw-r--r--keyboards/evyd13/gh80_1800/config.h5
-rw-r--r--keyboards/evyd13/gh80_1800/gh80_1800.c28
-rw-r--r--keyboards/evyd13/minitomic/config.h3
-rw-r--r--keyboards/evyd13/minitomic/minitomic.c34
-rw-r--r--keyboards/evyd13/mx5160/config.h5
-rw-r--r--keyboards/evyd13/mx5160/mx5160.c42
-rw-r--r--keyboards/evyd13/nt660/config.h2
-rw-r--r--keyboards/evyd13/nt660/nt660.c16
-rw-r--r--keyboards/evyd13/quackfire/config.h4
-rw-r--r--keyboards/evyd13/quackfire/quackfire.c28
-rw-r--r--keyboards/evyd13/wasdat/config.h5
-rw-r--r--keyboards/evyd13/wasdat/wasdat.c31
-rw-r--r--keyboards/evyd13/wasdat_code/config.h5
-rw-r--r--keyboards/evyd13/wasdat_code/wasdat_code.c31
-rw-r--r--keyboards/evyd13/wonderland/config.h5
-rw-r--r--keyboards/evyd13/wonderland/wonderland.c33
20 files changed, 44 insertions, 301 deletions
diff --git a/keyboards/evyd13/eon75/config.h b/keyboards/evyd13/eon75/config.h
index 707665140d..d7d84de2a3 100644
--- a/keyboards/evyd13/eon75/config.h
+++ b/keyboards/evyd13/eon75/config.h
@@ -51,6 +51,11 @@
*/
// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+#define LED_NUM_LOCK_PIN B7
+#define LED_CAPS_LOCK_PIN D5
+#define LED_SCROLL_LOCK_PIN B0
+#define LED_PIN_ON_STATE 0
+
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
diff --git a/keyboards/evyd13/eon75/eon75.c b/keyboards/evyd13/eon75/eon75.c
index 67e9fe66a2..38620a6362 100644
--- a/keyboards/evyd13/eon75/eon75.c
+++ b/keyboards/evyd13/eon75/eon75.c
@@ -14,32 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "eon75.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 led_init_ports(void) {
- // * Set our LED pins as output and high
- setPinOutput(D5);
- writePinHigh(D5);
-
- setPinOutput(B7);
- writePinHigh(B7);
-
- setPinOutput(B0);
- writePinHigh(B0);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(D5, !led_state.caps_lock);
- writePin(B7, !led_state.num_lock);
- writePin(B0, !led_state.scroll_lock);
- }
-
- return true;
-}
diff --git a/keyboards/evyd13/eon95/config.h b/keyboards/evyd13/eon95/config.h
index eb44d8957e..2d9ede3ee2 100644
--- a/keyboards/evyd13/eon95/config.h
+++ b/keyboards/evyd13/eon95/config.h
@@ -51,6 +51,11 @@
*/
// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+#define LED_NUM_LOCK_PIN B7
+#define LED_CAPS_LOCK_PIN D5
+#define LED_SCROLL_LOCK_PIN B0
+#define LED_PIN_ON_STATE 0
+
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
diff --git a/keyboards/evyd13/eon95/eon95.c b/keyboards/evyd13/eon95/eon95.c
index 5eec86cc11..603d84a139 100644
--- a/keyboards/evyd13/eon95/eon95.c
+++ b/keyboards/evyd13/eon95/eon95.c
@@ -14,32 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "eon95.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 led_init_ports(void) {
- // * Set our LED pins as output and high
- setPinOutput(D5);
- writePinHigh(D5);
-
- setPinOutput(B7);
- writePinHigh(B7);
-
- setPinOutput(B0);
- writePinHigh(B0);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(D5, !led_state.caps_lock);
- writePin(B7, !led_state.num_lock);
- writePin(B0, !led_state.scroll_lock);
- }
-
- return true;
-}
diff --git a/keyboards/evyd13/gh80_1800/config.h b/keyboards/evyd13/gh80_1800/config.h
index c230aa9af8..26ad8a8b13 100644
--- a/keyboards/evyd13/gh80_1800/config.h
+++ b/keyboards/evyd13/gh80_1800/config.h
@@ -51,6 +51,11 @@
*/
// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+#define LED_NUM_LOCK_PIN D6
+#define LED_CAPS_LOCK_PIN D7
+#define LED_SCROLL_LOCK_PIN D4
+#define LED_PIN_ON_STATE 0
+
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
diff --git a/keyboards/evyd13/gh80_1800/gh80_1800.c b/keyboards/evyd13/gh80_1800/gh80_1800.c
index 770c6f78bf..1691b3949e 100644
--- a/keyboards/evyd13/gh80_1800/gh80_1800.c
+++ b/keyboards/evyd13/gh80_1800/gh80_1800.c
@@ -14,31 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "gh80_1800.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 led_init_ports(void) {
- setPinOutput(D6);
- setPinOutput(D7);
- setPinOutput(D4);
-
- writePinHigh(D6);
- writePinHigh(D7);
- writePinHigh(D4);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(D6, !led_state.num_lock);
- writePin(D7, !led_state.caps_lock);
- writePin(D4, !led_state.scroll_lock);
- }
-
- return true;
-}
diff --git a/keyboards/evyd13/minitomic/config.h b/keyboards/evyd13/minitomic/config.h
index c041e86a2a..f26b4d1d95 100644
--- a/keyboards/evyd13/minitomic/config.h
+++ b/keyboards/evyd13/minitomic/config.h
@@ -51,6 +51,9 @@
*/
// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+#define LED_CAPS_LOCK_PIN C7
+#define LED_PIN_ON_STATE 0
+
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
diff --git a/keyboards/evyd13/minitomic/minitomic.c b/keyboards/evyd13/minitomic/minitomic.c
index 8d5f11a50d..15f2829648 100644
--- a/keyboards/evyd13/minitomic/minitomic.c
+++ b/keyboards/evyd13/minitomic/minitomic.c
@@ -14,37 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "minitomic.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 led pin as output, then high (off)
- writePinHigh(C7);
-}
-
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if(res) {
- // writePin sets the pin high for 1 and low for 0.
- // In this example the pins are inverted, setting
- // it low/0 turns it on, and high/1 turns the LED off.
- // This behavior depends on whether the LED is between the pin
- // and VCC or the pin and GND.
- writePin(C7, !led_state.caps_lock);
- }
- return res;
-}
-
diff --git a/keyboards/evyd13/mx5160/config.h b/keyboards/evyd13/mx5160/config.h
index 926095a5d2..c65f81b879 100644
--- a/keyboards/evyd13/mx5160/config.h
+++ b/keyboards/evyd13/mx5160/config.h
@@ -55,6 +55,11 @@
*/
// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+#define LED_NUM_LOCK_PIN B2
+#define LED_CAPS_LOCK_PIN B1
+#define LED_SCROLL_LOCK_PIN B3
+#define LED_PIN_ON_STATE 0
+
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
diff --git a/keyboards/evyd13/mx5160/mx5160.c b/keyboards/evyd13/mx5160/mx5160.c
index c9e412da24..298c44fd49 100644
--- a/keyboards/evyd13/mx5160/mx5160.c
+++ b/keyboards/evyd13/mx5160/mx5160.c
@@ -14,45 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "mx5160.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 led pin as output, then high (off)
-
- //Caps lock
- setPinOutput(B1);
- writePinHigh(B1);
-
- //Num lock
- setPinOutput(B2);
- writePinHigh(B2);
-
- //Scroll lock
- setPinOutput(B3);
- writePinHigh(B3);
-}
-
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if (res) {
- writePin(B2, !led_state.num_lock);
- writePin(B1, !led_state.caps_lock);
- writePin(B3, !led_state.scroll_lock);
- }
- return res;
-}
diff --git a/keyboards/evyd13/nt660/config.h b/keyboards/evyd13/nt660/config.h
index 0d9bbd3300..8638847142 100644
--- a/keyboards/evyd13/nt660/config.h
+++ b/keyboards/evyd13/nt660/config.h
@@ -53,6 +53,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+#define LED_CAPS_LOCK_PIN D0
+
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
diff --git a/keyboards/evyd13/nt660/nt660.c b/keyboards/evyd13/nt660/nt660.c
index 2a8ebfb46c..f89fa579c3 100644
--- a/keyboards/evyd13/nt660/nt660.c
+++ b/keyboards/evyd13/nt660/nt660.c
@@ -14,19 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "nt660.h"
-void matrix_init_kb(void) {
- matrix_init_user();
- led_init_ports();
-}
-
-void led_init_ports(void) {
- setPinOutput(D0);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(D0, !led_state.caps_lock);
- }
-
- return true;
-}
diff --git a/keyboards/evyd13/quackfire/config.h b/keyboards/evyd13/quackfire/config.h
index 22083e8118..151219a016 100644
--- a/keyboards/evyd13/quackfire/config.h
+++ b/keyboards/evyd13/quackfire/config.h
@@ -52,6 +52,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+#define LED_CAPS_LOCK_PIN F7
+#define LED_SCROLL_LOCK_PIN F6
+#define LED_PIN_ON_STATE 0
+
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 5
diff --git a/keyboards/evyd13/quackfire/quackfire.c b/keyboards/evyd13/quackfire/quackfire.c
index ab233bd6d4..634d4187c6 100644
--- a/keyboards/evyd13/quackfire/quackfire.c
+++ b/keyboards/evyd13/quackfire/quackfire.c
@@ -14,31 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quackfire.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(F6);
- setPinOutput(F7);
- writePinHigh(F6);
- writePinHigh(F7);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(F7, !led_state.caps_lock);
- writePin(F6, !led_state.scroll_lock);
- }
-
- return true;
-}
diff --git a/keyboards/evyd13/wasdat/config.h b/keyboards/evyd13/wasdat/config.h
index c064d18a58..75b75a0d2a 100644
--- a/keyboards/evyd13/wasdat/config.h
+++ b/keyboards/evyd13/wasdat/config.h
@@ -57,6 +57,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+#define LED_NUM_LOCK_PIN B2
+#define LED_CAPS_LOCK_PIN B0
+#define LED_SCROLL_LOCK_PIN B1
+#define LED_PIN_ON_STATE 0
+
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
diff --git a/keyboards/evyd13/wasdat/wasdat.c b/keyboards/evyd13/wasdat/wasdat.c
index 2d0e999c4e..6aaa1b8427 100644
--- a/keyboards/evyd13/wasdat/wasdat.c
+++ b/keyboards/evyd13/wasdat/wasdat.c
@@ -14,34 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "wasdat.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(B0);
- writePinHigh(B0);
- setPinOutput(B1);
- writePinHigh(B1);
- setPinOutput(B2);
- writePinHigh(B2);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(B0, !led_state.caps_lock);
- writePin(B1, !led_state.scroll_lock);
- writePin(B2, !led_state.num_lock);
- }
-
- return true;
-}
diff --git a/keyboards/evyd13/wasdat_code/config.h b/keyboards/evyd13/wasdat_code/config.h
index 804839ee9a..4ac77f217d 100644
--- a/keyboards/evyd13/wasdat_code/config.h
+++ b/keyboards/evyd13/wasdat_code/config.h
@@ -57,6 +57,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+#define LED_NUM_LOCK_PIN B3
+#define LED_CAPS_LOCK_PIN B1
+#define LED_SCROLL_LOCK_PIN B2
+#define LED_PIN_ON_STATE 0
+
#define BACKLIGHT_PIN B7
#define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 5
diff --git a/keyboards/evyd13/wasdat_code/wasdat_code.c b/keyboards/evyd13/wasdat_code/wasdat_code.c
index 33551c2d0c..c1cdadea9e 100644
--- a/keyboards/evyd13/wasdat_code/wasdat_code.c
+++ b/keyboards/evyd13/wasdat_code/wasdat_code.c
@@ -14,34 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "wasdat_code.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(B1);
- setPinOutput(B2);
- setPinOutput(B3);
- writePinHigh(B1);
- writePinHigh(B2);
- writePinHigh(B3);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(B1, !led_state.caps_lock);
- writePin(B2, !led_state.scroll_lock);
- writePin(B3, !led_state.num_lock);
- }
-
- return true;
-}
diff --git a/keyboards/evyd13/wonderland/config.h b/keyboards/evyd13/wonderland/config.h
index 908c8a7855..c5c7a8b6c6 100644
--- a/keyboards/evyd13/wonderland/config.h
+++ b/keyboards/evyd13/wonderland/config.h
@@ -43,6 +43,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
+#define LED_NUM_LOCK_PIN B1
+#define LED_CAPS_LOCK_PIN B2
+#define LED_SCROLL_LOCK_PIN B3
+#define LED_PIN_ON_STATE 0
+
/* Backlight configuration
*/
#define RGB_DI_PIN B7
diff --git a/keyboards/evyd13/wonderland/wonderland.c b/keyboards/evyd13/wonderland/wonderland.c
index 4415443816..f2a53a17a4 100644
--- a/keyboards/evyd13/wonderland/wonderland.c
+++ b/keyboards/evyd13/wonderland/wonderland.c
@@ -1,34 +1 @@
#include "wonderland.h"
-
-__attribute__ ((weak))
-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();
-};
-
-__attribute__ ((weak))
-void matrix_scan_kb(void) {
- // put your looping keyboard code here
- // runs every cycle (a lot)
- matrix_scan_user();
-};
-
-__attribute__ ((weak))
-void led_init_ports(void) {
- // * Set our LED pins as output
- setPinOutput(B1);
- setPinOutput(B2);
- setPinOutput(B3);
-}
-
-bool led_update_kb(led_t led_state) {
- bool runDefault = led_update_user(led_state);
- if (runDefault) {
- writePin(B1, !led_state.num_lock);
- writePin(B2, !led_state.caps_lock);
- writePin(B3, !led_state.scroll_lock);
- }
- return runDefault;
-}