From 217ad5cfc05a33cffbf100fe867b750f1deae7e1 Mon Sep 17 00:00:00 2001 From: peepeetee <43021794+peepeetee@users.noreply.github.com> Date: Mon, 17 Jan 2022 04:01:00 +0800 Subject: move yd60mq to ymdk vendor folder (#15647) --- keyboards/ymdk/yd60mq/yd60mq.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 keyboards/ymdk/yd60mq/yd60mq.c (limited to 'keyboards/ymdk/yd60mq/yd60mq.c') diff --git a/keyboards/ymdk/yd60mq/yd60mq.c b/keyboards/ymdk/yd60mq/yd60mq.c new file mode 100644 index 0000000000..bfe6b6c2de --- /dev/null +++ b/keyboards/ymdk/yd60mq/yd60mq.c @@ -0,0 +1,21 @@ +#include "yd60mq.h" + +__attribute__((weak)) +void matrix_init_kb(void){ + setPinOutput(F4); + writePinHigh(F4); +} + +__attribute__((weak)) +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (res) { + // writePin sets the pin high for 1 and low for 0. + // In this example the pins are inverted, setting + // it low/0 turns it on, and high/1 turns the LED off. + // This behavior depends on whether the LED is between the pin + // and VCC or the pin and GND. + writePin(F4, !led_state.caps_lock); + } + return res; +} -- cgit v1.2.3