diff options
Diffstat (limited to 'keyboards/gl516/a52gl')
-rw-r--r-- | keyboards/gl516/a52gl/keyboard.json (renamed from keyboards/gl516/a52gl/info.json) | 5 | ||||
-rw-r--r-- | keyboards/gl516/a52gl/matrix.c | 25 | ||||
-rw-r--r-- | keyboards/gl516/a52gl/rules.mk | 15 |
3 files changed, 18 insertions, 27 deletions
diff --git a/keyboards/gl516/a52gl/info.json b/keyboards/gl516/a52gl/keyboard.json index bc9b1cacfa..54fbce6bda 100644 --- a/keyboards/gl516/a52gl/info.json +++ b/keyboards/gl516/a52gl/keyboard.json @@ -10,6 +10,11 @@ }, "processor": "atmega32u4", "bootloader": "caterina", + "features": { + "bootmagic": true, + "mousekey": true, + "extrakey": true + }, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/gl516/a52gl/matrix.c b/keyboards/gl516/a52gl/matrix.c index 1a97fdfd61..1e2948f716 100644 --- a/keyboards/gl516/a52gl/matrix.c +++ b/keyboards/gl516/a52gl/matrix.c @@ -15,44 +15,43 @@ 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 "matrix.h" -#include "quantum.h" static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; 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]); + 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 select_col(uint8_t col) { - setPinOutput(col_pins[col]); - writePinLow(col_pins[col]); + gpio_set_pin_output(col_pins[col]); + gpio_write_pin_low(col_pins[col]); } static void unselect_col(uint8_t col) { - setPinInputHigh(col_pins[col]); + gpio_set_pin_input_high(col_pins[col]); } static void unselect_cols(void) { for(uint8_t x = 0; x < MATRIX_COLS; x++) { - setPinInputHigh(col_pins[x]); + gpio_set_pin_input_high(col_pins[x]); } } @@ -60,10 +59,10 @@ static void init_pins(void) { unselect_rows(); unselect_cols(); for (uint8_t x = 0; x < MATRIX_COLS; x++) { - setPinInputHigh(col_pins[x]); + gpio_set_pin_input_high(col_pins[x]); } for (uint8_t x = 0; x < MATRIX_ROWS; x++) { - setPinInputHigh(row_pins[x]); + gpio_set_pin_input_high(row_pins[x]); } } @@ -83,7 +82,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) 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); @@ -111,7 +110,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) matrix_row_t last_row_value = current_matrix[tmp]; // Check row pin state - if (readPin(row_pins[row_index]) == 0) + if (gpio_read_pin(row_pins[row_index]) == 0) { // Pin LO, set col bit current_matrix[tmp] |= (MATRIX_ROW_SHIFTER << current_col); diff --git a/keyboards/gl516/a52gl/rules.mk b/keyboards/gl516/a52gl/rules.mk index 109f8bc976..179d02c3c6 100644 --- a/keyboards/gl516/a52gl/rules.mk +++ b/keyboards/gl516/a52gl/rules.mk @@ -1,16 +1,3 @@ -# Build Options -# change yes to no to disable -# -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 = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output - CUSTOM_MATRIX = lite -SRC += matrix.c
\ No newline at end of file +SRC += matrix.c |