diff options
Diffstat (limited to 'keyboards/ibm/model_m')
24 files changed, 101 insertions, 124 deletions
diff --git a/keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c b/keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c index 92b577635c..8bdcfe070a 100644 --- a/keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c +++ b/keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c @@ -18,19 +18,19 @@ void keyboard_pre_init_kb(void) { /* Setting status LEDs pins to output and +5V (off) */ - setPinOutput(D5); - setPinOutput(D6); - setPinOutput(D7); - writePinHigh(D5); - writePinHigh(D6); - writePinHigh(D7); + gpio_set_pin_output(D5); + gpio_set_pin_output(D6); + gpio_set_pin_output(D7); + gpio_write_pin_high(D5); + gpio_write_pin_high(D6); + gpio_write_pin_high(D7); } bool led_update_kb(led_t led_state) { if(led_update_user(led_state)) { - writePin(D5, !led_state.num_lock); - writePin(D6, !led_state.caps_lock); - writePin(D7, !led_state.scroll_lock); + gpio_write_pin(D5, !led_state.num_lock); + gpio_write_pin(D6, !led_state.caps_lock); + gpio_write_pin(D7, !led_state.scroll_lock); } return true; } diff --git a/keyboards/ibm/model_m/ashpil_usbc/info.json b/keyboards/ibm/model_m/ashpil_usbc/keyboard.json index ffdb608edc..451589017e 100644 --- a/keyboards/ibm/model_m/ashpil_usbc/info.json +++ b/keyboards/ibm/model_m/ashpil_usbc/keyboard.json @@ -8,6 +8,14 @@ "pid": "0x0000", "device_version": "0.0.1" }, + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": false, + "nkro": false + }, "matrix_pins": { "cols": ["E6", "E7", "F0", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "A0", "A1", "A2", "A3", "A4", "A5"], "rows": ["C7", "C6", "C5", "C4", "C3", "C2", "C1", "C0"] diff --git a/keyboards/ibm/model_m/ashpil_usbc/rules.mk b/keyboards/ibm/model_m/ashpil_usbc/rules.mk deleted file mode 100644 index 6fe874e748..0000000000 --- a/keyboards/ibm/model_m/ashpil_usbc/rules.mk +++ /dev/null @@ -1,12 +0,0 @@ -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # 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 = no # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output diff --git a/keyboards/ibm/model_m/modelh/info.json b/keyboards/ibm/model_m/modelh/keyboard.json index 6d55d5c6bd..6d55d5c6bd 100644 --- a/keyboards/ibm/model_m/modelh/info.json +++ b/keyboards/ibm/model_m/modelh/keyboard.json diff --git a/keyboards/ibm/model_m/modelh/modelh.c b/keyboards/ibm/model_m/modelh/modelh.c index 5384b37338..4bf3d12e6a 100644 --- a/keyboards/ibm/model_m/modelh/modelh.c +++ b/keyboards/ibm/model_m/modelh/modelh.c @@ -18,8 +18,8 @@ void keyboard_pre_init_kb(void) { - setPinOutput(MODELH_STATUS_LED); - writePin(MODELH_STATUS_LED, 0); + gpio_set_pin_output(MODELH_STATUS_LED); + gpio_write_pin(MODELH_STATUS_LED, 0); keyboard_pre_init_user(); } diff --git a/keyboards/ibm/model_m/modelh/rules.mk b/keyboards/ibm/model_m/modelh/rules.mk deleted file mode 100644 index e69de29bb2..0000000000 --- a/keyboards/ibm/model_m/modelh/rules.mk +++ /dev/null diff --git a/keyboards/ibm/model_m/mschwingen/info.json b/keyboards/ibm/model_m/mschwingen/info.json index ce740e4a54..0deb57ed03 100644 --- a/keyboards/ibm/model_m/mschwingen/info.json +++ b/keyboards/ibm/model_m/mschwingen/info.json @@ -16,6 +16,18 @@ }, "processor": "atmega32u4", "bootloader": "lufa-dfu", + "features": { + "bootmagic": false, + "mousekey": true, + "extrakey": true, + "console": true, + "command": true, + "key_lock": true, + "dynamic_macro": true + }, + "build": { + "lto": true + }, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/ibm/model_m/mschwingen/led_ffc/keyboard.json b/keyboards/ibm/model_m/mschwingen/led_ffc/keyboard.json new file mode 100644 index 0000000000..2c63c08510 --- /dev/null +++ b/keyboards/ibm/model_m/mschwingen/led_ffc/keyboard.json @@ -0,0 +1,2 @@ +{ +} diff --git a/keyboards/ibm/model_m/mschwingen/led_ffc/rules.mk b/keyboards/ibm/model_m/mschwingen/led_ffc/rules.mk deleted file mode 100644 index 8b13789179..0000000000 --- a/keyboards/ibm/model_m/mschwingen/led_ffc/rules.mk +++ /dev/null @@ -1 +0,0 @@ - diff --git a/keyboards/ibm/model_m/mschwingen/led_wired/keyboard.json b/keyboards/ibm/model_m/mschwingen/led_wired/keyboard.json new file mode 100644 index 0000000000..2c63c08510 --- /dev/null +++ b/keyboards/ibm/model_m/mschwingen/led_wired/keyboard.json @@ -0,0 +1,2 @@ +{ +} diff --git a/keyboards/ibm/model_m/mschwingen/led_wired/rules.mk b/keyboards/ibm/model_m/mschwingen/led_wired/rules.mk deleted file mode 100644 index 8b13789179..0000000000 --- a/keyboards/ibm/model_m/mschwingen/led_wired/rules.mk +++ /dev/null @@ -1 +0,0 @@ - diff --git a/keyboards/ibm/model_m/mschwingen/led_ws2812/keyboard.json b/keyboards/ibm/model_m/mschwingen/led_ws2812/keyboard.json new file mode 100644 index 0000000000..2c63c08510 --- /dev/null +++ b/keyboards/ibm/model_m/mschwingen/led_ws2812/keyboard.json @@ -0,0 +1,2 @@ +{ +} diff --git a/keyboards/ibm/model_m/mschwingen/matrix.c b/keyboards/ibm/model_m/mschwingen/matrix.c index 361803edec..ae032a00a0 100644 --- a/keyboards/ibm/model_m/mschwingen/matrix.c +++ b/keyboards/ibm/model_m/mschwingen/matrix.c @@ -14,12 +14,9 @@ * 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 "util.h" #include "matrix.h" #include "debounce.h" -#include "quantum.h" #include "spi_master.h" #include "print.h" #include "mschwingen.h" @@ -34,15 +31,15 @@ static uint16_t row_bits[MATRIX_ROWS] = { static const pin_t col_pins[MATRIX_COLS] = {D1, D4, D7, B4, F7, F6, F5, F4}; 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]); } +static void unselect_col(uint8_t 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]); } } @@ -54,8 +51,8 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) select_col(current_col); matrix_io_delay(); - writePinLow(SR_LOAD_PIN); - writePinHigh(SR_LOAD_PIN); + gpio_write_pin_low(SR_LOAD_PIN); + gpio_write_pin_high(SR_LOAD_PIN); row_data = spi_read() << 8; row_data |= spi_read(); diff --git a/keyboards/ibm/model_m/mschwingen/mschwingen.c b/keyboards/ibm/model_m/mschwingen/mschwingen.c index 03dfcdc2f2..7112ab63a5 100644 --- a/keyboards/ibm/model_m/mschwingen/mschwingen.c +++ b/keyboards/ibm/model_m/mschwingen/mschwingen.c @@ -74,12 +74,12 @@ void sleep_led_toggle(void) {} void sleep_led_disable(void) { suspend_active = false; - writePinHigh(MODELM_STATUS_LED); + gpio_write_pin_high(MODELM_STATUS_LED); } void sleep_led_enable(void) { suspend_active = true; - writePinLow(MODELM_STATUS_LED); + gpio_write_pin_low(MODELM_STATUS_LED); #ifdef KEYBOARD_ibm_model_m_mschwingen_led_ws2812 led[0] = black; led[1] = black; @@ -90,18 +90,19 @@ void sleep_led_enable(void) { void keyboard_pre_init_kb(void) { #ifdef KEYBOARD_ibm_model_m_mschwingen_led_ws2812 + ws2812_init(); ws2812_setleds(led, RGBLIGHT_LED_COUNT); #else /* Set status LEDs pins to output and Low (on) */ - setPinOutput(MODELM_LED_CAPSLOCK); - setPinOutput(MODELM_LED_SCROLLOCK); - setPinOutput(MODELM_LED_NUMLOCK); - writePinLow(MODELM_LED_CAPSLOCK); - writePinLow(MODELM_LED_SCROLLOCK); - writePinLow(MODELM_LED_NUMLOCK); + gpio_set_pin_output(MODELM_LED_CAPSLOCK); + gpio_set_pin_output(MODELM_LED_SCROLLOCK); + gpio_set_pin_output(MODELM_LED_NUMLOCK); + gpio_write_pin_low(MODELM_LED_CAPSLOCK); + gpio_write_pin_low(MODELM_LED_SCROLLOCK); + gpio_write_pin_low(MODELM_LED_NUMLOCK); #endif - setPinOutput(MODELM_STATUS_LED); - writePinHigh(MODELM_STATUS_LED); + gpio_set_pin_output(MODELM_STATUS_LED); + gpio_write_pin_high(MODELM_STATUS_LED); _delay_ms(50); #ifdef UART_DEBUG uart_init(115200); @@ -109,10 +110,10 @@ void keyboard_pre_init_kb(void) { uprintf("\r\nHello world!\r\n"); #endif - setPinOutput(SR_LOAD_PIN); - setPinOutput(SR_CLK_PIN); - setPinOutput(SR_DOUT_PIN); // MOSI - unused - writePinLow(SR_CLK_PIN); + gpio_set_pin_output(SR_LOAD_PIN); + gpio_set_pin_output(SR_CLK_PIN); + gpio_set_pin_output(SR_DOUT_PIN); // MOSI - unused + gpio_write_pin_low(SR_CLK_PIN); } #ifdef KEYBOARD_ibm_model_m_mschwingen_led_ws2812 @@ -186,9 +187,9 @@ bool led_update_kb(led_t led_state) { dprintf("LED Update: %d %d %d", led_state.num_lock, led_state.caps_lock, led_state.scroll_lock); if (led_update_user(led_state)) { - if (!isRecording) writePin(MODELM_LED_NUMLOCK, !led_state.num_lock); - writePin(MODELM_LED_CAPSLOCK, !led_state.caps_lock); - writePin(MODELM_LED_SCROLLOCK, !led_state.scroll_lock); + if (!isRecording) gpio_write_pin(MODELM_LED_NUMLOCK, !led_state.num_lock); + gpio_write_pin(MODELM_LED_CAPSLOCK, !led_state.caps_lock); + gpio_write_pin(MODELM_LED_SCROLLOCK, !led_state.scroll_lock); } return true; } @@ -197,7 +198,7 @@ void update_layer_leds(void) { if (isRecording && timer_elapsed(blink_cycle_timer) > 150) { blink_state = !blink_state; blink_cycle_timer = timer_read(); - writePin(MODELM_LED_NUMLOCK, blink_state); + gpio_write_pin(MODELM_LED_NUMLOCK, blink_state); } } diff --git a/keyboards/ibm/model_m/mschwingen/post_rules.mk b/keyboards/ibm/model_m/mschwingen/post_rules.mk index a1c2040f4c..025068e057 100644 --- a/keyboards/ibm/model_m/mschwingen/post_rules.mk +++ b/keyboards/ibm/model_m/mschwingen/post_rules.mk @@ -1,3 +1,5 @@ +UART_DEBUG ?= no + ifeq ($(strip $(UART_DEBUG)), yes) OPT_DEFS += -DUART_DEBUG endif diff --git a/keyboards/ibm/model_m/mschwingen/rules.mk b/keyboards/ibm/model_m/mschwingen/rules.mk index 7d81ffe326..65761bcf9a 100644 --- a/keyboards/ibm/model_m/mschwingen/rules.mk +++ b/keyboards/ibm/model_m/mschwingen/rules.mk @@ -1,29 +1,9 @@ -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # 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 -KEY_LOCK_ENABLE = yes - -DYNAMIC_MACRO_ENABLE = yes - -UART_DEBUG = no SRC += matrix.c UART_DRIVER_REQUIRED = yes SPI_DRIVER_REQUIRED = yes -OPT_DEFS += -DSLEEP_LED_ENABLE # we need our own sleep callbacks to turn of WS2812 LEDs - -LTO_ENABLE = yes +OPT_DEFS += -DSLEEP_LED_ENABLE DEFAULT_FOLDER = ibm/model_m/mschwingen/led_wired diff --git a/keyboards/ibm/model_m/teensy2/info.json b/keyboards/ibm/model_m/teensy2/keyboard.json index 19603adb7a..173f9e772f 100644 --- a/keyboards/ibm/model_m/teensy2/info.json +++ b/keyboards/ibm/model_m/teensy2/keyboard.json @@ -8,6 +8,14 @@ "pid": "0x0000", "device_version": "0.0.1" }, + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": false, + "nkro": false + }, "matrix_pins": { "cols": ["F0", "F1", "F4", "F5", "F6", "F7", "B6", "B5", "B4", "D7", "D6", "B0", "B1", "B2", "B3", "B7"], "rows": ["D0", "D1", "D2", "D3", "C6", "C7", "D5", "D4"] diff --git a/keyboards/ibm/model_m/teensy2/rules.mk b/keyboards/ibm/model_m/teensy2/rules.mk deleted file mode 100644 index 6fe874e748..0000000000 --- a/keyboards/ibm/model_m/teensy2/rules.mk +++ /dev/null @@ -1,12 +0,0 @@ -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # 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 = no # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output diff --git a/keyboards/ibm/model_m/teensypp/info.json b/keyboards/ibm/model_m/teensypp/keyboard.json index dcbed72aeb..4464a299f6 100644 --- a/keyboards/ibm/model_m/teensypp/info.json +++ b/keyboards/ibm/model_m/teensypp/keyboard.json @@ -15,6 +15,11 @@ "diode_direction": "ROW2COL", "processor": "at90usb1286", "bootloader": "halfkay", + "features": { + "bootmagic": false, + "mousekey": false, + "extrakey": false + }, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/ibm/model_m/teensypp/rules.mk b/keyboards/ibm/model_m/teensypp/rules.mk deleted file mode 100644 index 1eeda920b4..0000000000 --- a/keyboards/ibm/model_m/teensypp/rules.mk +++ /dev/null @@ -1,12 +0,0 @@ -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = no # 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 diff --git a/keyboards/ibm/model_m/teensypp/teensypp.c b/keyboards/ibm/model_m/teensypp/teensypp.c index fa8669dc81..aac85424bf 100644 --- a/keyboards/ibm/model_m/teensypp/teensypp.c +++ b/keyboards/ibm/model_m/teensypp/teensypp.c @@ -17,20 +17,20 @@ void led_init_ports(void) { /* Setting status LEDs pins to output and +5V (off) */ - setPinOutput(B4); - setPinOutput(B5); - setPinOutput(B6); - writePinHigh(B4); - writePinHigh(B5); - writePinHigh(B6); + gpio_set_pin_output(B4); + gpio_set_pin_output(B5); + gpio_set_pin_output(B6); + gpio_write_pin_high(B4); + gpio_write_pin_high(B5); + gpio_write_pin_high(B6); } bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(B4, !led_state.num_lock); - writePin(B6, !led_state.caps_lock); - writePin(B5, !led_state.scroll_lock); + gpio_write_pin(B4, !led_state.num_lock); + gpio_write_pin(B6, !led_state.caps_lock); + gpio_write_pin(B5, !led_state.scroll_lock); } return res; } diff --git a/keyboards/ibm/model_m/yugo_m/info.json b/keyboards/ibm/model_m/yugo_m/keyboard.json index f4d9cc1d94..968c637b78 100644 --- a/keyboards/ibm/model_m/yugo_m/info.json +++ b/keyboards/ibm/model_m/yugo_m/keyboard.json @@ -8,6 +8,14 @@ "pid": "0x8E81", "device_version": "0.0.1" }, + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": false + }, "matrix_pins": { "cols": ["A9", "A8", "B15", "B14", "B13", "B12", "B11", "B10", "B2", "B1", "B0", "A7", "A6", "A5", "A4", "A3"], "rows": ["B8", "B7", "B6", "B5", "B4", "B3", "A15", "A14"] diff --git a/keyboards/ibm/model_m/yugo_m/rules.mk b/keyboards/ibm/model_m/yugo_m/rules.mk deleted file mode 100644 index ab2c49da70..0000000000 --- a/keyboards/ibm/model_m/yugo_m/rules.mk +++ /dev/null @@ -1,12 +0,0 @@ -# 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 diff --git a/keyboards/ibm/model_m/yugo_m/yugo_m.c b/keyboards/ibm/model_m/yugo_m/yugo_m.c index 542043d5dc..a725a3657b 100644 --- a/keyboards/ibm/model_m/yugo_m/yugo_m.c +++ b/keyboards/ibm/model_m/yugo_m/yugo_m.c @@ -17,9 +17,9 @@ void keyboard_pre_init_kb(void) { // Set our LED pins as output - setPinOutput(A2); - setPinOutput(A1); - setPinOutput(A0); + gpio_set_pin_output(A2); + gpio_set_pin_output(A1); + gpio_set_pin_output(A0); keyboard_pre_init_user(); } @@ -27,9 +27,9 @@ void keyboard_pre_init_kb(void) { bool led_update_kb(led_t led_state) { bool res = led_update_user(led_state); if(res) { - writePin(A2, !led_state.num_lock); - writePin(A1, !led_state.caps_lock); - writePin(A0, !led_state.scroll_lock); + gpio_write_pin(A2, !led_state.num_lock); + gpio_write_pin(A1, !led_state.caps_lock); + gpio_write_pin(A0, !led_state.scroll_lock); } return res; } |