diff options
author | walkerstop <walkerstop@gmail.com> | 2019-03-12 15:23:09 -0700 |
---|---|---|
committer | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2019-03-12 15:23:09 -0700 |
commit | 73c4c9f9e8d2299d0b3a66b2ea8fa3450b9bad31 (patch) | |
tree | 9df81464db1a1298408c312fb98eb60dcb10a06d /keyboards/mt980/mt980.c | |
parent | 131b647a962ba676af8a9ea650cbad0d6b046a55 (diff) | |
download | qmk_firmware-73c4c9f9e8d2299d0b3a66b2ea8fa3450b9bad31.tar.gz qmk_firmware-73c4c9f9e8d2299d0b3a66b2ea8fa3450b9bad31.zip |
Wheat Field Peripherals mt980 (FC980M Layout) PCB Support (#5374)
* mt980 keyboard support
* Update manufacturer name
* Correct indicator LEDs, add walker keymap
* Added readme.md
* Update keyboards/mt980/mt980.c
Co-Authored-By: walkerstop <walkerstop@gmail.com>
* Treat number pad + and enter as pgup and pgdn when number lock is off
* Update keyboards/mt980/mt980.c
Co-Authored-By: walkerstop <walkerstop@gmail.com>
* Update keyboards/mt980/mt980.c
Co-Authored-By: walkerstop <walkerstop@gmail.com>
* Update keyboards/mt980/readme.md
Co-Authored-By: walkerstop <walkerstop@gmail.com>
* Update keyboards/mt980/readme.md
Co-Authored-By: walkerstop <walkerstop@gmail.com>
* Update keyboards/mt980/readme.md
Co-Authored-By: walkerstop <walkerstop@gmail.com>
* Update keyboards/mt980/rules.mk
Co-Authored-By: walkerstop <walkerstop@gmail.com>
Diffstat (limited to 'keyboards/mt980/mt980.c')
-rw-r--r-- | keyboards/mt980/mt980.c | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/keyboards/mt980/mt980.c b/keyboards/mt980/mt980.c new file mode 100644 index 000000000..1b03d1aed --- /dev/null +++ b/keyboards/mt980/mt980.c | |||
@@ -0,0 +1,60 @@ | |||
1 | #include "mt980.h" | ||
2 | |||
3 | __attribute__ ((weak)) | ||
4 | void matrix_init_keymap(void) {} | ||
5 | |||
6 | __attribute__ ((weak)) | ||
7 | void matrix_scan_keymap(void) {} | ||
8 | |||
9 | __attribute__ ((weak)) | ||
10 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | ||
11 | return true; | ||
12 | } | ||
13 | __attribute__ ((weak)) | ||
14 | uint32_t layer_state_set_keymap (uint32_t state) { | ||
15 | return state; | ||
16 | } | ||
17 | __attribute__ ((weak)) | ||
18 | void led_set_keymap(uint8_t usb_led) {} | ||
19 | |||
20 | __attribute__ ((weak)) | ||
21 | void action_function_keymap(keyrecord_t *record, uint8_t id, uint8_t opt) {} | ||
22 | |||
23 | void keyboard_pre_init_user(void) { | ||
24 | /* Set NUMLOCK indicator pin as output */ | ||
25 | setPinOutput(C6); | ||
26 | /* Set CAPSLOCK indicator pin as output */ | ||
27 | setPinOutput(C7); | ||
28 | /* Set SCROLLOCK indicator pin as output */ | ||
29 | setPinOutput(B5); | ||
30 | } | ||
31 | |||
32 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
33 | return process_record_keymap(keycode, record); | ||
34 | } | ||
35 | |||
36 | void led_set_user(uint8_t usb_led) { | ||
37 | |||
38 | if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { | ||
39 | writePinLow(C6); | ||
40 | } | ||
41 | else { | ||
42 | writePinHigh(C6); | ||
43 | } | ||
44 | |||
45 | if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { | ||
46 | writePinLow(C7); | ||
47 | } | ||
48 | else { | ||
49 | writePinHigh(C7); | ||
50 | } | ||
51 | |||
52 | if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { | ||
53 | writePinLow(B5); | ||
54 | } | ||
55 | else { | ||
56 | writePinHigh(B5); | ||
57 | } | ||
58 | |||
59 | led_set_keymap(usb_led); | ||
60 | } | ||