Add kb2040 onkey keyboard that works with the oled keymap (#17786)

master
Jeff Epler 2022-08-05 21:38:10 -05:00 committed by GitHub
parent ad4ef47d2b
commit 7bbc1b21dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 72 additions and 0 deletions

View File

@ -0,0 +1,29 @@
// Copyright 2022 Stefan Kerkmann
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "config_common.h"
#define PRODUCT Onekey Raspberry Pi RP2040
#define MATRIX_COL_PINS \
{ GP4 }
#define MATRIX_ROW_PINS \
{ GP5 }
#define DEBUG_MATRIX_SCAN_RATE
#define QMK_WAITING_TEST_BUSY_PIN GP8
#define QMK_WAITING_TEST_YIELD_PIN GP9
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP25
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U
#define RGB_DI_PIN A1
// settings for the oled keyboard demo with Adafruit 0.91" OLED display on the Stemma QT port
#define OLED_DISPLAY_128X32
#define I2C_DRIVER I2CD1
#define I2C1_SDA_PIN GP12
#define I2C1_SCL_PIN GP13

View File

@ -0,0 +1,24 @@
/* Copyright 2020 QMK
*
* 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_I2C_USE_I2C0
#define RP_I2C_USE_I2C0 TRUE
#undef RP_I2C_USE_I2C1
#define RP_I2C_USE_I2C1 TRUE

View File

@ -0,0 +1,10 @@
# Adafruit KB2040 onekey with OLED
To trigger keypress, short together pins *GP4* and *GP5*.
Double-tap reset to enter bootloader mode. Copy the built uf2 file to the device by dragging the file to the new USB disk.
## Supported Hardware
* [Adafruit KB2040 - RP2040 Kee Boar](https://www.adafruit.com/product/5302)
* Optional [128x32 OLED display on the Stemma QT port](https://www.adafruit.com/product/4440)

View File

@ -0,0 +1,9 @@
# MCU name
MCU = RP2040
BOOTLOADER = rp2040
OLED_ENABLE = yes
OLED_DRIVER = SSD1306
OPT_DEFS += -DHAL_USE_I2C=TRUE