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:
@@ -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;
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user