Make the LED do something.

clueboard_1
skullY 7 years ago
parent 75977b86ea
commit f5cc84ffd0

@ -1,6 +1,29 @@
#include "1.h" #include "1.h"
#include "print.h"
#define BUTTON SAFE_RANGE
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//[0] = LAYOUT(BL_STEP) //[0] = LAYOUT(BL_STEP)
[0] = LAYOUT(KC_1) //[0] = LAYOUT(KC_1)
[0] = LAYOUT(BUTTON)
}; };
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case BUTTON:
if (record->event.pressed) {
print("BUTTON was pressed!\n");
palClearPad(GPIOB, 5);
palClearPad(GPIOB, 3);
palClearPad(GPIOA, 2);
} else {
print("BUTTON was released!\n");
palSetPad(GPIOB, 5);
palSetPad(GPIOB, 3);
palSetPad(GPIOA, 2);
}
return false;
}
return true;
}

@ -47,3 +47,4 @@ CONSOLE_ENABLE = yes # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # USB Nkey Rollover NKRO_ENABLE = yes # USB Nkey Rollover
CUSTOM_MATRIX = yes # Custom matrix file CUSTOM_MATRIX = yes # Custom matrix file
#AUDIO_ENABLE = yes

Loading…
Cancel
Save