diff options
Diffstat (limited to 'keyboards/handwired/owlet60')
-rw-r--r-- | keyboards/handwired/owlet60/keyboard.json (renamed from keyboards/handwired/owlet60/info.json) | 7 | ||||
-rw-r--r-- | keyboards/handwired/owlet60/matrix.c | 36 | ||||
-rw-r--r-- | keyboards/handwired/owlet60/rules.mk | 13 |
3 files changed, 25 insertions, 31 deletions
diff --git a/keyboards/handwired/owlet60/info.json b/keyboards/handwired/owlet60/keyboard.json index f6bd2d2f23..8108f51985 100644 --- a/keyboards/handwired/owlet60/info.json +++ b/keyboards/handwired/owlet60/keyboard.json @@ -32,6 +32,13 @@ }, "processor": "atmega32u4", "bootloader": "caterina", + "features": { + "bootmagic": false, + "mousekey": false, + "extrakey": true, + "nkro": true, + "rgblight": true + }, "debounce": 9, "community_layouts": ["alice", "alice_split_bs"], "layout_aliases": { diff --git a/keyboards/handwired/owlet60/matrix.c b/keyboards/handwired/owlet60/matrix.c index b233dd7a52..43895468e9 100644 --- a/keyboards/handwired/owlet60/matrix.c +++ b/keyboards/handwired/owlet60/matrix.c @@ -129,19 +129,19 @@ void matrix_print(void) // uses standard row code 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]); } } @@ -149,10 +149,10 @@ static void init_pins(void) { // still need some fixing, this might not work unselect_rows(); // with the loop /* for (uint8_t x = 0; x < MATRIX_COLS; x++) { - setPinInputHigh(col_pins[x]); + gpio_set_pin_input_high(col_pins[x]); } */ - setPinInputHigh(dat_pin); + gpio_set_pin_input_high(dat_pin); } static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) @@ -173,7 +173,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) // Select the col pin to read (active low) select_col_analog(col_index); wait_us(30); - uint8_t pin_state = readPin(dat_pin); + uint8_t pin_state = gpio_read_pin(dat_pin); // Populate the matrix row with the state of the col pin current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); @@ -201,8 +201,8 @@ void matrix_init(void) { matrix_init_kb(); - setPinInput(D5); - setPinInput(B0); + gpio_set_pin_input(D5); + gpio_set_pin_input(B0); } // modified for per col read matrix scan @@ -273,27 +273,27 @@ static void select_col_analog(uint8_t col) { static void mux_pin_control(const uint8_t binary[]) { // set pin0 - setPinOutput(col_select_pins[0]); + gpio_set_pin_output(col_select_pins[0]); if(binary[2] == 0) { - writePinLow(col_select_pins[0]); + gpio_write_pin_low(col_select_pins[0]); } else { - writePinHigh(col_select_pins[0]); + gpio_write_pin_high(col_select_pins[0]); } // set pin1 - setPinOutput(col_select_pins[1]); + gpio_set_pin_output(col_select_pins[1]); if(binary[1] == 0) { - writePinLow(col_select_pins[1]); + gpio_write_pin_low(col_select_pins[1]); } else { - writePinHigh(col_select_pins[1]); + gpio_write_pin_high(col_select_pins[1]); } // set pin2 - setPinOutput(col_select_pins[2]); + gpio_set_pin_output(col_select_pins[2]); if(binary[0] == 0) { - writePinLow(col_select_pins[2]); + gpio_write_pin_low(col_select_pins[2]); } else { - writePinHigh(col_select_pins[2]); + gpio_write_pin_high(col_select_pins[2]); } } diff --git a/keyboards/handwired/owlet60/rules.mk b/keyboards/handwired/owlet60/rules.mk index dd125034f2..09c02c88b0 100644 --- a/keyboards/handwired/owlet60/rules.mk +++ b/keyboards/handwired/owlet60/rules.mk @@ -1,16 +1,3 @@ -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -MOUSEKEY_ENABLE = no # 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 = yes # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output CUSTOM_MATRIX = yes -OLED_ENABLE = no SRC += matrix.c |