Skip to content

Commit

Permalink
Fix & clean up tronguylabs/m122_3270 (qmk#13684)
Browse files Browse the repository at this point in the history
  • Loading branch information
fauxpark authored and nhongooi committed Dec 5, 2021
1 parent 635c42e commit 22d2f94
Show file tree
Hide file tree
Showing 14 changed files with 318 additions and 347 deletions.
4 changes: 1 addition & 3 deletions keyboards/tronguylabs/m122_3270/blackpill/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

#pragma once

// place overrides below

// Blackpill pin assignments: reversed the rows from the Teensy version for easier PCB layout
// DO NOT USE the following pins: A9 (has pulldown on it), A11/A12 (USB lines), B2 (external pulldown)
// C13 has an LED, and C13/C14/C15 are best used as inputs (with DIODE_DIRECTION set to ROW2COL, the
Expand All @@ -26,4 +24,4 @@
#define MATRIX_ROW_PINS { C13, C14, C15, A0, A1, A2, A3, A4 }

// The BlackPill version is version 2
#define DEVICE_VER 0x0002
#define DEVICE_VER 0x0002
1 change: 1 addition & 0 deletions keyboards/tronguylabs/m122_3270/blackpill/readme.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# BlackPill controller for m122-3270

This directory contains the BlackPill-specific definitions for the M122-3270 keyboard.
19 changes: 17 additions & 2 deletions keyboards/tronguylabs/m122_3270/blackpill/rules.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
# Overrides for the Blackpill version

# MCU name
MCU = STM32F411

# Bootloader selection
BOOTLOADER = stm32-dfu

# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
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
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
42 changes: 4 additions & 38 deletions keyboards/tronguylabs/m122_3270/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@

#include "config_common.h"

#define VENDOR_ID 0x1209
#define PRODUCT_ID 0x3270
// DEVICE_VER is defined in each variant's config.h file
#define MANUFACTURER IBM
#define PRODUCT Model M PC/3270 122 key
#define VENDOR_ID 0x1209
#define PRODUCT_ID 0x3270
#define MANUFACTURER IBM
#define PRODUCT Model M PC/3270 122 key

// Both controllers draw 100 mA or less
#define USB_MAX_POWER_CONSUMPTION 100
Expand All @@ -31,41 +30,8 @@
#define MATRIX_ROWS 8
#define MATRIX_COLS 20

/*
* Keyboard Matrix Assignments
*
* Change this to how you wired your keyboard
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
*
*/
#define UNUSED_PINS

/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION ROW2COL

/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 15

/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
*/
// #define GRAVE_ESC_CTRL_OVERRIDE

/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/

/* disable debug print */
//#define NO_DEBUG

/* disable print */
//#define NO_PRINT

/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
285 changes: 154 additions & 131 deletions keyboards/tronguylabs/m122_3270/info.json
Original file line number Diff line number Diff line change
@@ -1,134 +1,157 @@
{
"keyboard_name": "IBM Model M PC/3270 122 key",
"maintainer": "jmaynard",
"width": 24.75,
"height": 8,
"layouts": {
"LAYOUT": {
"layout": [
{"label":"F13", "x":3.25, "y":0},
{"label":"F14", "x":4.25, "y":0},
{"label":"F15", "x":5.25, "y":0},
{"label":"F16", "x":6.25, "y":0},
{"label":"F17", "x":7.25, "y":0},
{"label":"F18", "x":8.25, "y":0},
{"label":"F19", "x":9.25, "y":0},
{"label":"F20", "x":10.25, "y":0},
{"label":"F21", "x":11.25, "y":0},
{"label":"F22", "x":12.25, "y":0},
{"label":"F23", "x":13.25, "y":0},
{"label":"F24", "x":14.25, "y":0},
{"label":"F1", "x":3.25, "y":1},
{"label":"F2", "x":4.25, "y":1},
{"label":"F3", "x":5.25, "y":1},
{"label":"F4", "x":6.25, "y":1},
{"label":"F5", "x":7.25, "y":1},
{"label":"F6", "x":8.25, "y":1},
{"label":"F7", "x":9.25, "y":1},
{"label":"F8", "x":10.25, "y":1},
{"label":"F9", "x":11.25, "y":1},
{"label":"F10", "x":12.25, "y":1},
{"label":"F11", "x":13.25, "y":1},
{"label":"F12", "x":14.25, "y":1},
{"label":"Esc", "x":0, "y":3},
{"x":1, "y":3},
{"label":"`", "x":2.25, "y":3},
{"label":"1", "x":3.25, "y":3},
{"label":"2", "x":4.25, "y":3},
{"label":"3", "x":5.25, "y":3},
{"label":"4", "x":6.25, "y":3},
{"label":"5", "x":7.25, "y":3},
{"label":"6", "x":8.25, "y":3},
{"label":"7", "x":9.25, "y":3},
{"label":"8", "x":10.25, "y":3},
{"label":"9", "x":11.25, "y":3},
{"label":"0", "x":12.25, "y":3},
{"label":"-", "x":13.25, "y":3},
{"label":"=", "x":14.25, "y":3},
{"label":"Backspace", "x":15.25, "y":3, "w":2},
{"label":"Insert", "x":17.5, "y":3},
{"label":"Home", "x":18.5, "y":3},
{"label":"Page Up", "x":19.5, "y":3},
{"label":"Num Lock", "x":20.75, "y":3},
{"label":"/", "x":21.75, "y":3},
{"label":"*", "x":22.75, "y":3},
{"label":"-", "x":23.75, "y":3},
{"x":0, "y":4},
{"x":1, "y":4},
{"label":"Tab", "x":2.25, "y":4, "w":1.5},
{"label":"Q", "x":3.75, "y":4},
{"label":"W", "x":4.75, "y":4},
{"label":"E", "x":5.75, "y":4},
{"label":"R", "x":6.75, "y":4},
{"label":"T", "x":7.75, "y":4},
{"label":"Y", "x":8.75, "y":4},
{"label":"U", "x":9.75, "y":4},
{"label":"I", "x":10.75, "y":4},
{"label":"O", "x":11.75, "y":4},
{"label":"P", "x":12.75, "y":4},
{"label":"[", "x":13.75, "y":4},
{"label":"]", "x":14.75, "y":4},
{"label":"Enter", "x":16, "y":4, "w":1.25, "h":2},
{"label":"Delete", "x":17.5, "y":4},
{"label":"End", "x":18.5, "y":4},
{"label":"Page Down", "x":19.5, "y":4},
{"label":"7", "x":20.75, "y":4},
{"label":"8", "x":21.75, "y":4},
{"label":"9", "x":22.75, "y":4},
{"label":"+", "x":23.75, "y":4},
{"x":0, "y":5},
{"x":1, "y":5},
{"label":"Caps Lock", "x":2.25, "y":5, "w":1.75},
{"label":"A", "x":4, "y":5},
{"label":"S", "x":5, "y":5},
{"label":"D", "x":6, "y":5},
{"label":"F", "x":7, "y":5},
{"label":"G", "x":8, "y":5},
{"label":"H", "x":9, "y":5},
{"label":"J", "x":10, "y":5},
{"label":"K", "x":11, "y":5},
{"label":"L", "x":12, "y":5},
{"label":";", "x":13, "y":5},
{"label":"'", "x":14, "y":5},
{"label":"#", "x":15, "y":5},
{"label":"Up", "x":18.5, "y":5},
{"label":"4", "x":20.75, "y":5},
{"label":"5", "x":21.75, "y":5},
{"label":"6", "x":22.75, "y":5},
{"x":23.75, "y":5},
{"x":0, "y":6},
{"x":1, "y":6},
{"label":"Shift", "x":2.25, "y":6, "w":1.25},
{"label":"\\", "x":3.5, "y":6},
{"label":"Z", "x":4.5, "y":6},
{"label":"X", "x":5.5, "y":6},
{"label":"C", "x":6.5, "y":6},
{"label":"V", "x":7.5, "y":6},
{"label":"B", "x":8.5, "y":6},
{"label":"N", "x":9.5, "y":6},
{"label":"M", "x":10.5, "y":6},
{"label":",", "x":11.5, "y":6},
{"label":".", "x":12.5, "y":6},
{"label":"/", "x":13.5, "y":6},
{"label":"Shift", "x":14.5, "y":6, "w":2.75},
{"label":"Left", "x":17.5, "y":6},
{"x":18.5, "y":6},
{"label":"Right", "x":19.5, "y":6},
{"label":"1", "x":20.75, "y":6},
{"label":"2", "x":21.75, "y":6},
{"label":"3", "x":22.75, "y":6},
{"label":"Enter", "x":23.75, "y":6, "h":2},
{"x":0, "y":7},
{"x":1, "y":7},
{"label":"Ctrl", "x":2.25, "y":7, "w":1.5},
{"label":"Alt", "x":4.75, "y":7, "w":1.5},
{"x":6.25, "y":7, "w":7},
{"label":"AltGr", "x":13.25, "y":7, "w":1.5},
{"label":"Ctrl", "x":15.75, "y":7, "w":1.5},
{"label":"Down", "x":18.5, "y":7},
{"label":"0", "x":20.75, "y":7, "w":2},
{"label":".", "x":22.75, "y":7}
]
"keyboard_name": "IBM Model M PC/3270 122 key",
"maintainer": "jmaynard",
"width": 24.75,
"height": 8,
"layouts": {
"LAYOUT": {
"layout": [
{"x": 3.25, "y": 0},
{"x": 4.25, "y": 0},
{"x": 5.25, "y": 0},
{"x": 6.25, "y": 0},
{"x": 7.25, "y": 0},
{"x": 8.25, "y": 0},
{"x": 9.25, "y": 0},
{"x": 10.25, "y": 0},
{"x": 11.25, "y": 0},
{"x": 12.25, "y": 0},
{"x": 13.25, "y": 0},
{"x": 14.25, "y": 0},

{"x": 3.25, "y": 1},
{"x": 4.25, "y": 1},
{"x": 5.25, "y": 1},
{"x": 6.25, "y": 1},
{"x": 7.25, "y": 1},
{"x": 8.25, "y": 1},
{"x": 9.25, "y": 1},
{"x": 10.25, "y": 1},
{"x": 11.25, "y": 1},
{"x": 12.25, "y": 1},
{"x": 13.25, "y": 1},
{"x": 14.25, "y": 1},

{"x": 0, "y": 3},
{"x": 1, "y": 3},

{"x": 2.25, "y": 3},
{"x": 3.25, "y": 3},
{"x": 4.25, "y": 3},
{"x": 5.25, "y": 3},
{"x": 6.25, "y": 3},
{"x": 7.25, "y": 3},
{"x": 8.25, "y": 3},
{"x": 9.25, "y": 3},
{"x": 10.25, "y": 3},
{"x": 11.25, "y": 3},
{"x": 12.25, "y": 3},
{"x": 13.25, "y": 3},
{"x": 14.25, "y": 3},
{"x": 15.25, "y": 3, "w": 2},

{"x": 17.5, "y": 3},
{"x": 18.5, "y": 3},
{"x": 19.5, "y": 3},

{"x": 20.75, "y": 3},
{"x": 21.75, "y": 3},
{"x": 22.75, "y": 3},
{"x": 23.75, "y": 3},

{"x": 0, "y": 4},
{"x": 1, "y": 4},

{"x": 2.25, "y": 4, "w": 1.5},
{"x": 3.75, "y": 4},
{"x": 4.75, "y": 4},
{"x": 5.75, "y": 4},
{"x": 6.75, "y": 4},
{"x": 7.75, "y": 4},
{"x": 8.75, "y": 4},
{"x": 9.75, "y": 4},
{"x": 10.75, "y": 4},
{"x": 11.75, "y": 4},
{"x": 12.75, "y": 4},
{"x": 13.75, "y": 4},
{"x": 14.75, "y": 4},
{"x": 16, "y": 4, "w": 1.25, "h": 2},

{"x": 17.5, "y": 4},
{"x": 18.5, "y": 4},
{"x": 19.5, "y": 4},

{"x": 20.75, "y": 4},
{"x": 21.75, "y": 4},
{"x": 22.75, "y": 4},
{"x": 23.75, "y": 4},

{"x": 0, "y": 5},
{"x": 1, "y": 5},

{"x": 2.25, "y": 5, "w": 1.75},
{"x": 4, "y": 5},
{"x": 5, "y": 5},
{"x": 6, "y": 5},
{"x": 7, "y": 5},
{"x": 8, "y": 5},
{"x": 9, "y": 5},
{"x": 10, "y": 5},
{"x": 11, "y": 5},
{"x": 12, "y": 5},
{"x": 13, "y": 5},
{"x": 14, "y": 5},
{"x": 15, "y": 5},

{"x": 18.5, "y": 5},

{"x": 20.75, "y": 5},
{"x": 21.75, "y": 5},
{"x": 22.75, "y": 5},
{"x": 23.75, "y": 5},

{"x": 0, "y": 6},
{"x": 1, "y": 6},

{"x": 2.25, "y": 6, "w": 1.25},
{"x": 3.5, "y": 6},
{"x": 4.5, "y": 6},
{"x": 5.5, "y": 6},
{"x": 6.5, "y": 6},
{"x": 7.5, "y": 6},
{"x": 8.5, "y": 6},
{"x": 9.5, "y": 6},
{"x": 10.5, "y": 6},
{"x": 11.5, "y": 6},
{"x": 12.5, "y": 6},
{"x": 13.5, "y": 6},
{"x": 14.5, "y": 6, "w": 2.75},

{"x": 17.5, "y": 6},
{"x": 18.5, "y": 6},
{"x": 19.5, "y": 6},

{"x": 20.75, "y": 6},
{"x": 21.75, "y": 6},
{"x": 22.75, "y": 6},
{"x": 23.75, "y": 6, "h": 2},

{"x": 0, "y": 7},
{"x": 1, "y": 7},

{"x": 2.25, "y": 7, "w": 1.5},

{"x": 4.75, "y": 7, "w": 1.5},
{"x": 6.25, "y": 7, "w": 7},
{"x": 13.25, "y": 7, "w": 1.5},

{"x": 15.75, "y": 7, "w": 1.5},

{"x": 18.5, "y": 7},

{"x": 20.75, "y": 7, "w": 2},
{"x": 22.75, "y": 7}
]
}
}
}
}
Loading

0 comments on commit 22d2f94

Please sign in to comment.