aboutsummaryrefslogtreecommitdiff
path: root/keyboards/mexsistor
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/mexsistor')
-rw-r--r--keyboards/mexsistor/ludmila/keyboard.json (renamed from keyboards/mexsistor/ludmila/info.json)7
-rw-r--r--keyboards/mexsistor/ludmila/matrix.c19
-rw-r--r--keyboards/mexsistor/ludmila/rules.mk13
3 files changed, 15 insertions, 24 deletions
diff --git a/keyboards/mexsistor/ludmila/info.json b/keyboards/mexsistor/ludmila/keyboard.json
index 6e44d33913..71202208c5 100644
--- a/keyboards/mexsistor/ludmila/info.json
+++ b/keyboards/mexsistor/ludmila/keyboard.json
@@ -8,6 +8,13 @@
"pid": "0x6BF6",
"device_version": "0.0.1"
},
+ "features": {
+ "bootmagic": true,
+ "mousekey": true,
+ "extrakey": true,
+ "rgblight": true,
+ "encoder": true
+ },
"encoder": {
"rotary": [
{"pin_a": "F6", "pin_b": "F5"}
diff --git a/keyboards/mexsistor/ludmila/matrix.c b/keyboards/mexsistor/ludmila/matrix.c
index 338286a7db..fd197f366d 100644
--- a/keyboards/mexsistor/ludmila/matrix.c
+++ b/keyboards/mexsistor/ludmila/matrix.c
@@ -14,12 +14,9 @@ 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 <stdint.h>
-#include <stdbool.h>
#include "wait.h"
#include "util.h"
#include "matrix.h"
-#include "quantum.h"
// Encoder things
#define ENC_SW F7
@@ -34,22 +31,22 @@ extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values
static void select_row(uint8_t row) {
- setPinOutput(row_pins[row]);
- writePinLow(row_pins[row]);
+ gpio_set_pin_output(row_pins[row]);
+ gpio_write_pin_low(row_pins[row]);
}
-static void unselect_row(uint8_t row) { setPinInputHigh(row_pins[row]); }
+static void unselect_row(uint8_t row) { gpio_set_pin_input_high(row_pins[row]); }
static void unselect_rows(void) {
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
- setPinInputHigh(row_pins[x]);
+ gpio_set_pin_input_high(row_pins[x]);
}
}
static void init_pins(void) {
unselect_rows();
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
- setPinInputHigh(col_pins[x]);
+ gpio_set_pin_input_high(col_pins[x]);
}
}
@@ -67,7 +64,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
// For each col...
for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
// Select the col pin to read (active low)
- uint8_t pin_state = readPin(col_pins[col_index]);
+ uint8_t pin_state = gpio_read_pin(col_pins[col_index]);
// Populate the matrix row with the state of the col pin
current_matrix[current_row] |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);
@@ -82,7 +79,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
void matrix_init_custom(void) {
// initialize key pins
- setPinInput(ENC_SW);
+ gpio_set_pin_input(ENC_SW);
init_pins();
}
@@ -111,7 +108,7 @@ static bool read_encoder_switches(matrix_row_t current_matrix[], uint8_t current
static uint8_t btn_1_array;
bool btn_1_pressed = 0;
btn_1_array <<= 1;
- btn_1_array |= readPin(ENC_SW);
+ btn_1_array |= gpio_read_pin(ENC_SW);
(btn_1_array == 0b11111111) ? (btn_1_pressed = 1) : (btn_1_pressed = 0);
// Populate the matrix row with the state of the encoder
diff --git a/keyboards/mexsistor/ludmila/rules.mk b/keyboards/mexsistor/ludmila/rules.mk
index 547c4ad49c..7376674056 100644
--- a/keyboards/mexsistor/ludmila/rules.mk
+++ b/keyboards/mexsistor/ludmila/rules.mk
@@ -1,15 +1,2 @@
-# Build Options
-# change yes to no to disable
-#
CUSTOM_MATRIX = lite
SRC = matrix.c
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = no # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-ENCODER_ENABLE = yes