forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bastardkb/dilemma/assembled: add new keyboard
Fixes qmk#20
- Loading branch information
Showing
7 changed files
with
143 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* 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 "quantum.h" | ||
|
||
// Forward declare RP2040 SDK declaration. | ||
void gpio_init(uint gpio); | ||
|
||
void keyboard_pre_init_user(void) { | ||
// Ensures that GP26 through GP29 are initialized as digital inputs (as | ||
// opposed to analog inputs). These GPIOs are shared with A0 through A3, | ||
// respectively. On RP2040-B2 and later, the digital inputs are disabled by | ||
// default (see RP2040-E6). | ||
gpio_init(GP26); | ||
gpio_init(GP27); | ||
gpio_init(GP28); | ||
gpio_init(GP29); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/** | ||
* Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#pragma once | ||
|
||
/* Key matrix configuration. */ | ||
#define MATRIX_ROW_PINS \ | ||
{ GP4, GP5, GP28, GP26 } | ||
#define MATRIX_COL_PINS \ | ||
{ GP8, GP9, GP7, GP6, GP27 } | ||
|
||
/* Handedness. */ | ||
#define SPLIT_HAND_PIN GP29 | ||
#define SPLIT_HAND_PIN_LOW_IS_LEFT // High -> right, Low -> left. | ||
|
||
/* serial.c configuration (for split keyboard). */ | ||
#define SOFT_SERIAL_PIN GP1 | ||
|
||
/* CRC. */ | ||
#define CRC8_USE_TABLE | ||
#define CRC8_OPTIMIZE_SPEED | ||
|
||
/* Cirque trackpad. */ | ||
#define SPI_SCK_PIN GP22 | ||
#define SPI_MOSI_PIN GP23 | ||
#define SPI_MISO_PIN GP20 | ||
#define CIRQUE_PINNACLE_SPI_CS_PIN GP21 | ||
|
||
/* Reset. */ | ||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET | ||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP17 | ||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#define HAL_USE_SPI TRUE | ||
|
||
#include_next "halconf.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"keyboard_name": "Dilemma Assembled", | ||
"usb": { | ||
"device_version": "1.0.0", | ||
}, | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include_next "mcuconf.h" | ||
|
||
#undef RP_SPI_USE_SPI1 | ||
#define RP_SPI_USE_SPI1 TRUE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# MCU name | ||
MCU = RP2040 | ||
|
||
# Bootloader selection | ||
BOOTLOADER = rp2040 | ||
|
||
# RP2040-specific options | ||
PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS. | ||
SERIAL_DRIVER = vendor | ||
|
||
# Assembled version uses SPI instead of I2C. | ||
POINTING_DEVICE_DRIVER = cirque_pinnacle_spi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters