aboutsummaryrefslogtreecommitdiff
path: root/keyboards/al1
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2020-11-21 19:11:24 +0000
committerGitHub <noreply@github.com>2020-11-21 19:11:24 +0000
commit23222625c201cd960a5b4a99ee52e74d4c13bba9 (patch)
tree0fc0f24d2a60fb9e327debaca0b9fac72716487a /keyboards/al1
parent4368611bfd87a544689ed10bb4450a39314bf1a1 (diff)
downloadqmk_firmware-23222625c201cd960a5b4a99ee52e74d4c13bba9.tar.gz
qmk_firmware-23222625c201cd960a5b4a99ee52e74d4c13bba9.zip
Refactor to use led config - Part 5 (#10975)
* Refactor to use led config * Refactor to use led config * Refactor to use led config
Diffstat (limited to 'keyboards/al1')
-rw-r--r--keyboards/al1/al1.c24
-rw-r--r--keyboards/al1/al1.h5
-rw-r--r--keyboards/al1/config.h5
3 files changed, 5 insertions, 29 deletions
diff --git a/keyboards/al1/al1.c b/keyboards/al1/al1.c
index e50a6373b..460a7620c 100644
--- a/keyboards/al1/al1.c
+++ b/keyboards/al1/al1.c
@@ -14,27 +14,3 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16#include "al1.h" 16#include "al1.h"
17
18bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
19 return process_record_user(keycode, record);
20}
21
22void led_set_kb(uint8_t usb_led) {
23 CONFIG_LED_IO;
24 print_dec(usb_led);
25 if (usb_led & (1<<USB_LED_CAPS_LOCK))
26 PORTB &= ~(1<<7);
27 else
28 PORTB |= (1<<7);
29
30 if (usb_led & (1<<USB_LED_NUM_LOCK))
31 PORTD &= ~(1<<0);
32 else
33 PORTD |= (1<<0);
34
35 if (usb_led & (1<<USB_LED_SCROLL_LOCK))
36 PORTD &= ~(1<<1);
37 else
38 PORTD |= (1<<1);
39 led_set_user(usb_led);
40}
diff --git a/keyboards/al1/al1.h b/keyboards/al1/al1.h
index 17a0c9655..c313a898d 100644
--- a/keyboards/al1/al1.h
+++ b/keyboards/al1/al1.h
@@ -18,11 +18,6 @@
18 18
19#include "quantum.h" 19#include "quantum.h"
20 20
21#define CONFIG_LED_IO \
22 DDRB |= (1<<7) | (1<<6); \
23 DDRD |= (1<<0) | (1<<1);
24
25
26#define LAYOUT( \ 21#define LAYOUT( \
27 K500, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K415, K414,\ 22 K500, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K415, K414,\
28 K501, K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K215, K413,\ 23 K501, K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K215, K413,\
diff --git a/keyboards/al1/config.h b/keyboards/al1/config.h
index f4ded4346..6a59afae7 100644
--- a/keyboards/al1/config.h
+++ b/keyboards/al1/config.h
@@ -46,6 +46,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
46/* COL2ROW, ROW2COL*/ 46/* COL2ROW, ROW2COL*/
47#define DIODE_DIRECTION COL2ROW 47#define DIODE_DIRECTION COL2ROW
48 48
49#define LED_NUM_LOCK_PIN D0
50#define LED_CAPS_LOCK_PIN B7
51#define LED_SCROLL_LOCK_PIN D1
52#define LED_PIN_ON_STATE 0
53
49#define BACKLIGHT_PIN B6 54#define BACKLIGHT_PIN B6
50#define BACKLIGHT_BREATHING 55#define BACKLIGHT_BREATHING
51#define BACKLIGHT_LEVELS 3 56#define BACKLIGHT_LEVELS 3