Cheapino v2 wip
This commit is contained in:
parent
9d538fc75a
commit
f0892a027c
@ -28,8 +28,8 @@ uint32_t flash_led(uint32_t next_trigger_time, void *cb_arg) {
|
||||
}
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
//debug_enable=true;
|
||||
//debug_matrix=true;
|
||||
debug_enable=true;
|
||||
debug_matrix=true;
|
||||
//debug_keyboard=true;
|
||||
//debug_mouse=true;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"manufacturer": "Thomas Haukland",
|
||||
"keyboard_name": "cheapino",
|
||||
"keyboard_name": "cheapino2",
|
||||
"maintainer": "tompi",
|
||||
"bootloader": "rp2040",
|
||||
"diode_direction": "ROW2COL",
|
||||
@ -16,15 +16,15 @@
|
||||
"split_3x5_3"
|
||||
],
|
||||
"matrix_pins": {
|
||||
"cols": ["GP0", "GP0", "GP1", "GP1", "GP2", "GP2", "GP29", "GP29", "GP28", "GP28", "GP27", "GP27"],
|
||||
"rows": ["GP6", "GP5", "GP4", "GP3"]
|
||||
"cols": ["GP0", "GP0", "GP1", "GP1", "GP2", "GP2", "GP14", "GP14", "GP15", "GP15", "GP26", "GP26"],
|
||||
"rows": ["GP3", "GP4", "GP5", "GP6", "GP27", "GP28", "GP29", "GP8"]
|
||||
},
|
||||
"processor": "RP2040",
|
||||
"url": "",
|
||||
"usb": {
|
||||
"device_version": "1.0.0",
|
||||
"pid": "0x0000",
|
||||
"vid": "0xFEED"
|
||||
"vid": "0xFEE3"
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT_split_3x5_3": {
|
||||
|
@ -36,7 +36,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#undef TAPPING_TERM
|
||||
#define TAPPING_TERM 200
|
||||
// #define PERMISSIVE_HOLD
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
|
||||
#define TAPPING_FORCE_HOLD
|
||||
//#define RETRO_TAPPING
|
||||
|
||||
|
@ -94,7 +94,7 @@ static void read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
|
||||
|
||||
uint16_t column_index_bitmask = COL_SHIFTER << (current_col * 2);
|
||||
// For each row...
|
||||
for (uint8_t row_index = 0; row_index < MATRIX_ROWS-1; row_index++) {
|
||||
for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
|
||||
// Check row pin state
|
||||
if (readPin(row_pins[row_index])) {
|
||||
// Pin HI, clear col bit
|
||||
@ -113,8 +113,6 @@ void matrix_init_custom(void) {
|
||||
// initialize key pins
|
||||
unselect_cols();
|
||||
unselect_rows();
|
||||
setPinInput(row_pins[MATRIX_ROWS-1]);
|
||||
writePinHigh(row_pins[MATRIX_ROWS-1]);
|
||||
debounce_init(MATRIX_ROWS);
|
||||
}
|
||||
|
||||
@ -131,22 +129,10 @@ bool has_matrix_changed(matrix_row_t current_matrix[]) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// OK, this is nasty, still not sure why its happening, but
|
||||
// this 3 key combo leads to ghosting of the 4th(the one missing from correct)
|
||||
static const uint16_t ghost1_row2 = 0B0000010000100000;
|
||||
static const uint16_t ghost1_row3 = 0B0000100000100000;
|
||||
static const matrix_row_t ghost1_row3_correct = 0B0000100000000000;
|
||||
|
||||
void fix_ghosting_issue(matrix_row_t current_matrix[]) {
|
||||
if (current_matrix[1] == ghost1_row2 && current_matrix[2] == ghost1_row3) {
|
||||
current_matrix[2] = ghost1_row3_correct;
|
||||
}
|
||||
}
|
||||
|
||||
bool matrix_scan_custom(matrix_row_t current_matrix[]) {
|
||||
store_old_matrix(current_matrix);
|
||||
// Set row, read cols
|
||||
for (uint8_t current_row = 0; current_row < MATRIX_ROWS-1; current_row++) {
|
||||
for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) {
|
||||
read_cols_on_row(current_matrix, current_row);
|
||||
}
|
||||
// Set col, read rows
|
||||
@ -154,10 +140,6 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) {
|
||||
read_rows_on_col(current_matrix, current_col);
|
||||
}
|
||||
|
||||
fix_ghosting_issue(current_matrix);
|
||||
|
||||
fix_encoder_action(current_matrix);
|
||||
|
||||
return has_matrix_changed(current_matrix);
|
||||
}
|
||||
|
||||
|
71
keyboards/cheapino/v2/info.json
Normal file
71
keyboards/cheapino/v2/info.json
Normal file
@ -0,0 +1,71 @@
|
||||
{
|
||||
"manufacturer": "Thomas Haukland",
|
||||
"keyboard_name": "cheapino2",
|
||||
"maintainer": "tompi",
|
||||
"bootloader": "rp2040",
|
||||
"diode_direction": "ROW2COL",
|
||||
"features": {
|
||||
"bootmagic": true,
|
||||
"command": false,
|
||||
"console": true,
|
||||
"extrakey": true,
|
||||
"mousekey": true,
|
||||
"nkro": false
|
||||
},
|
||||
"community_layouts": [
|
||||
"split_3x5_3"
|
||||
],
|
||||
"matrix_pins": {
|
||||
"cols": ["GP0", "GP0", "GP1", "GP1", "GP2", "GP2", "GP14", "GP14", "GP15", "GP15", "GP26", "GP26"],
|
||||
"rows": ["GP3", "GP4", "GP5", "GP6", "GP27", "GP28", "GP29", "GP8"]
|
||||
},
|
||||
"processor": "RP2040",
|
||||
"url": "",
|
||||
"usb": {
|
||||
"device_version": "1.0.0",
|
||||
"pid": "0x0000",
|
||||
"vid": "0xFEE3"
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT_split_3x5_3": {
|
||||
"layout": [
|
||||
{ "matrix": [0, 4], "x": 0, "y": 0.25 },
|
||||
{ "matrix": [0, 3], "x": 1, "y": 0.125 },
|
||||
{ "matrix": [0, 2], "x": 2, "y": 0 },
|
||||
{ "matrix": [0, 1], "x": 3, "y": 0.125 },
|
||||
{ "matrix": [0, 0], "x": 4, "y": 0.25 },
|
||||
{ "matrix": [2, 6], "x": 7, "y": 0.25 },
|
||||
{ "matrix": [2, 7], "x": 8, "y": 0.125 },
|
||||
{ "matrix": [2, 8], "x": 9, "y": 0 },
|
||||
{ "matrix": [2, 9], "x": 10, "y": 0.125 },
|
||||
{ "matrix": [2, 10], "x": 11, "y": 0.25 },
|
||||
{ "matrix": [1, 4], "x": 0, "y": 1.25 },
|
||||
{ "matrix": [1, 3], "x": 1, "y": 1.125 },
|
||||
{ "matrix": [1, 2], "x": 2, "y": 1 },
|
||||
{ "matrix": [1, 1], "x": 3, "y": 1.125 },
|
||||
{ "matrix": [1, 0], "x": 4, "y": 1.25 },
|
||||
{ "matrix": [1, 6], "x": 7, "y": 1.25 },
|
||||
{ "matrix": [1, 7], "x": 8, "y": 1.125 },
|
||||
{ "matrix": [1, 8], "x": 9, "y": 1 },
|
||||
{ "matrix": [1, 9], "x": 10, "y": 1.125 },
|
||||
{ "matrix": [1, 10], "x": 11, "y": 1.25 },
|
||||
{ "matrix": [2, 4], "x": 0, "y": 2.25 },
|
||||
{ "matrix": [2, 3], "x": 1, "y": 2.125 },
|
||||
{ "matrix": [2, 2], "x": 2, "y": 2 },
|
||||
{ "matrix": [2, 1], "x": 3, "y": 2.125 },
|
||||
{ "matrix": [2, 0], "x": 4, "y": 2.25 },
|
||||
{ "matrix": [0, 6], "x": 7, "y": 2.25 },
|
||||
{ "matrix": [0, 7], "x": 8, "y": 2.125 },
|
||||
{ "matrix": [0, 8], "x": 9, "y": 2 },
|
||||
{ "matrix": [0, 9], "x": 10, "y": 2.125 },
|
||||
{ "matrix": [0, 10], "x": 11, "y": 2.25 },
|
||||
{ "matrix": [2, 5], "x": 2.5, "y": 3.25 },
|
||||
{ "matrix": [1, 5], "x": 3.5, "y": 3.5 },
|
||||
{ "matrix": [0, 5], "x": 4.5, "y": 3.75 },
|
||||
{ "matrix": [2, 11], "x": 6.5, "y": 3.75 },
|
||||
{ "matrix": [1, 11], "x": 7.5, "y": 3.5 },
|
||||
{ "matrix": [0, 11], "x": 8.5, "y": 3.25 }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
0
keyboards/cheapino/v2/rules.mk
Normal file
0
keyboards/cheapino/v2/rules.mk
Normal file
Loading…
x
Reference in New Issue
Block a user