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
This commit is contained in:
Joel Challis
2021-03-10 22:48:18 +00:00
committed by GitHub
parent 9089244db7
commit 790f94533c
153 changed files with 249 additions and 1623 deletions

View File

@@ -15,30 +15,3 @@
*/
#include "adelais.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(B2);
writePinLow(B2);
setPinOutput(C15);
writePinLow(C15);
setPinOutput(B9);
writePinLow(B9);
}
bool led_update_kb(led_t led_state) {
if(led_update_user(led_state)) {
writePin(B2, led_state.caps_lock);
writePin(B9, led_state.scroll_lock);
writePin(C15, led_state.num_lock);
}
return true;
}

View File

@@ -30,3 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
#define LED_NUM_LOCK_PIN C15
#define LED_CAPS_LOCK_PIN B2
#define LED_SCROLL_LOCK_PIN B9

View File

@@ -41,4 +41,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, D3 }
#define MATRIX_COL_PINS { F7, D7, D6, D2 }
#define DIODE_DIRECTION COL2ROW
#define DIODE_DIRECTION COL2ROW
#define LED_NUM_LOCK_PIN B5

View File

@@ -15,21 +15,3 @@
*/
#include "delphine.h"
void matrix_init_kb(void) {
matrix_init_user();
led_init_ports();
}
void led_init_ports(void) {
setPinOutput(B5);
writePinLow(B5);
}
bool led_update_kb(led_t led_state) {
if(led_update_user(led_state)) {
writePin(B5, led_state.num_lock);
}
return true;
}

View File

@@ -41,6 +41,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
#define LED_CAPS_LOCK_PIN B9
#define BACKLIGHT_PIN B8
#define BACKLIGHT_BREATHING
#define BACKLIGHT_PWM_DRIVER PWMD3

View File

@@ -15,21 +15,3 @@
*/
#include "hannah65.h"
void matrix_init_kb(void) {
matrix_init_user();
led_init_ports();
}
void led_init_ports(void) {
setPinOutput(B9);
writePinLow(B9);
}
bool led_update_kb(led_t led_state) {
if(led_update_user(led_state)) {
writePin(B9, led_state.caps_lock);
}
return true;
}

View File

@@ -45,6 +45,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
#define LED_NUM_LOCK_PIN A3
#define LED_CAPS_LOCK_PIN A4
#define BACKLIGHT_PIN B0
#define BACKLIGHT_BREATHING

View File

@@ -15,24 +15,3 @@
*/
#include "infinity87.h"
void matrix_init_kb(void) {
matrix_init_user();
led_init_ports();
}
void led_init_ports(void) {
setPinOutput(A3);
writePinLow(A3);
setPinOutput(A4);
writePinLow(A4);
}
bool led_update_kb(led_t led_state) {
if(led_update_user(led_state)) {
writePin(A4, led_state.caps_lock);
writePin(A3, led_state.num_lock);
}
return true;
}

View File

@@ -45,6 +45,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
#define LED_NUM_LOCK_PIN A3
#define LED_CAPS_LOCK_PIN A4
#define BACKLIGHT_PIN B0
#define BACKLIGHT_BREATHING

View File

@@ -15,25 +15,3 @@
*/
#include "infinity88.h"
void matrix_init_kb(void) {
matrix_init_user();
led_init_ports();
}
void led_init_ports(void) {
setPinOutput(A3);
writePinLow(A3);
setPinOutput(A4);
writePinLow(A4);
}
bool led_update_kb(led_t led_state) {
if(led_update_user(led_state)) {
writePin(A4, led_state.caps_lock);
writePin(A3, led_state.num_lock);
}
return true;
}

View File

@@ -45,6 +45,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
#define LED_CAPS_LOCK_PIN B2
#define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 3

View File

@@ -15,28 +15,3 @@
*/
#include "pisces.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(B2);
writePinLow(B2);
}
bool led_update_kb(led_t led_state) {
if(led_update_user(led_state)) {
writePin(B2, led_state.caps_lock);
}
return true;
}