aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/alps64/alps64.c
diff options
context:
space:
mode:
authorMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-09-14 20:03:11 -0700
committerDrashna Jaelre <drashna@live.com>2019-09-14 20:03:11 -0700
commit9508b3f333dbd56ca5a91044874daa47f7be1902 (patch)
tree77970693c8a0ff32676a4e9981985a46f3125966 /keyboards/alps64/alps64.c
parent6c871408dfe971dce72910a0868b564eb8e76e27 (diff)
downloadfirmware-9508b3f333dbd56ca5a91044874daa47f7be1902.tar.gz
firmware-9508b3f333dbd56ca5a91044874daa47f7be1902.tar.bz2
firmware-9508b3f333dbd56ca5a91044874daa47f7be1902.zip
[Keyboard] Alps64 Refactor (#6723)
* get rid of custom matrix that is no longer being used * remove _kc LAYOUT * remove ifdefs and replace with pragma once * cleanup rules and use bootmagic lite * get rid of led.c * Update keyboards/alps64/alps64.c Co-Authored-By: Drashna Jaelre <drashna@live.com> * remove unneeded configurations
Diffstat (limited to 'keyboards/alps64/alps64.c')
-rw-r--r--keyboards/alps64/alps64.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/keyboards/alps64/alps64.c b/keyboards/alps64/alps64.c
index 472d1d445..0e4ef07bc 100644
--- a/keyboards/alps64/alps64.c
+++ b/keyboards/alps64/alps64.c
@@ -14,17 +14,24 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "quantum.h"
+#include "alps64.h"
-#define LED_ON() do { DDRC |= (1<<5); PORTC |= (1<<5); } while (0)
-#define LED_OFF() do { DDRC &= ~(1<<5); PORTC &= ~(1<<5); } while (0)
-#define LED_TGL() do { DDRC |= (1<<5); PINC |= (1<<5); } while (0)
+void keyboard_pre_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+ setPinOutput(C5);
+ keyboard_pre_init_user();
+}
+void led_set_kb(uint8_t usb_led)
+{
+ if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
+ // output high
+ writePinHigh(C5);
+ } else {
+ // Hi-Z
+ writePinLow(C5);
+ }
-void matrix_init_kb(void) {
- LED_ON();
- _delay_ms(500);
- LED_OFF();
-
- matrix_init_user();
-} \ No newline at end of file
+ led_set_user(usb_led);
+}