diff options
Diffstat (limited to 'keyboards/evyd13/wasdat_code/wasdat_code.c')
| -rw-r--r-- | keyboards/evyd13/wasdat_code/wasdat_code.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/keyboards/evyd13/wasdat_code/wasdat_code.c b/keyboards/evyd13/wasdat_code/wasdat_code.c new file mode 100644 index 000000000..33551c2d0 --- /dev/null +++ b/keyboards/evyd13/wasdat_code/wasdat_code.c | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | /* Copyright 2019 Evy Dekkers | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include "wasdat_code.h" | ||
| 17 | |||
| 18 | // Optional override functions below. | ||
| 19 | // You can leave any or all of these undefined. | ||
| 20 | // These are only required if you want to perform custom actions. | ||
| 21 | |||
| 22 | void matrix_init_kb(void) { | ||
| 23 | // put your keyboard start-up code here | ||
| 24 | // runs once when the firmware starts up | ||
| 25 | |||
| 26 | matrix_init_user(); | ||
| 27 | led_init_ports(); | ||
| 28 | } | ||
| 29 | |||
| 30 | void led_init_ports(void) { | ||
| 31 | setPinOutput(B1); | ||
| 32 | setPinOutput(B2); | ||
| 33 | setPinOutput(B3); | ||
| 34 | writePinHigh(B1); | ||
| 35 | writePinHigh(B2); | ||
| 36 | writePinHigh(B3); | ||
| 37 | } | ||
| 38 | |||
| 39 | bool led_update_kb(led_t led_state) { | ||
| 40 | if(led_update_user(led_state)) { | ||
| 41 | writePin(B1, !led_state.caps_lock); | ||
| 42 | writePin(B2, !led_state.scroll_lock); | ||
| 43 | writePin(B3, !led_state.num_lock); | ||
| 44 | } | ||
| 45 | |||
| 46 | return true; | ||
| 47 | } | ||
