Skip to content

Commit

Permalink
[Keyboard] Update pimoroni/keybow2040
Browse files Browse the repository at this point in the history
Rename info.json to keyboard.json
Update keyboards/pimoroni/keybow2040/readme.md
Update keyboards/pimoroni/keybow2040/readme.md
Update keyboards/pimoroni/keybow2040/mcuconf.h
Update keyboards/pimoroni/keybow2040/info.json
Update keyboards/pimoroni/keybow2040/config.h
Delete rules.mk
Update keyboards/pimoroni/keybow2040/keybow2040.c
Update keyboards/pimoroni/keybow2040/keyboard.json
Update keyboards/pimoroni/keybow2040/config.h

Co-Authored-By: Joel Challis <git@zvecr.com>
  • Loading branch information
willoucom and zvecr committed Jun 23, 2024
1 parent 1f69e8b commit f322d39
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 90 deletions.
19 changes: 1 addition & 18 deletions keyboards/pimoroni/keybow2040/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,9 @@

#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET

/*
* enable reactive animations
*/
#define RGB_MATRIX_KEYPRESSES
#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND

/*
* I2C address is set by IS31FL3731 AD pin connected to ground
*/
#define IS31FL3731_I2C_ADDRESS_1 0b1110100

/*
* The RP2040 has two I2C peripherals; I2C0 must be used with GPIO 4
* and 5 which on the Keybow 2040 are wired up to the IS31FL3731.
*/
#define I2C_DRIVER I2CD0

/*
* I2C1 here refers to the board's / QMK's first (and only) I2C
* peripheral, not to the RP2040's second I2C peripheral.
*/
#define I2C1_SDA_PIN GP4
#define I2C1_SCL_PIN GP5
#define I2C1_CLOCK_SPEED 100000
3 changes: 0 additions & 3 deletions keyboards/pimoroni/keybow2040/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

#pragma once

/*
* see config.h for notes on the Keybow 2040 I2C setup
*/
#define HAL_USE_I2C TRUE

#include_next <halconf.h>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"bootloader": "rp2040",
"board": "GENERIC_RP_RP2040",
"features": {
"console": true,
"extrakey": true,
"mousekey": true,
"nkro": true,
Expand Down Expand Up @@ -51,7 +50,6 @@
"rainbow_moving_chevron": true,
"rainbow_pinwheels": true,
"raindrops": true,
"solid_color": true,
"solid_reactive": true,
"solid_reactive_cross": true,
"solid_reactive_nexus": true,
Expand Down Expand Up @@ -87,7 +85,7 @@
["GP19", "GP15", "GP11", "GP7"],
["GP20", "GP16", "GP12", "GP8"],
["GP21", "GP17", "GP13", "GP9"],
["GP23", "NO_PIN", "NO_PIN", "NO_PIN"]
["GP23", null, null, null]
]
},
"layouts": {
Expand Down
5 changes: 1 addition & 4 deletions keyboards/pimoroni/keybow2040/keybow2040.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
#include "quantum.h"

#ifdef RGB_MATRIX_ENABLE
/*
* the LED addresses must match the wiring in the Keybow 2040 schematic
*/
const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
/* driver, r, g, b */
{ 0, C8_9, C6_9, C7_9 }, // LEDB12 0,0
{ 0, C9_9, C3_9, C5_9 }, // LEDB11 1,0
Expand Down
11 changes: 4 additions & 7 deletions keyboards/pimoroni/keybow2040/mcuconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
#pragma once

#include_next <mcuconf.h>

/*
* see config.h for notes on the Keybow 2040 I2C setup
*/
#undef RP_I2C_USE_I2C0
#undef RP_I2C_USE_I2C1
#undef RP_I2C_USE_I2C0
#define RP_I2C_USE_I2C0 TRUE
#define RP_I2C_USE_I2C1 FALSE

#undef RP_I2C_USE_I2C1
#define RP_I2C_USE_I2C1 FALSE
63 changes: 9 additions & 54 deletions keyboards/pimoroni/keybow2040/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ per key RGB lighting, in a decorative FR4 sandwich. The Keybow 2040 is
also known by its codename Venus Dust, or its product codes of the
form PIM56x.

* Keyboard Maintainer: [Tony Finch](https://github.com/fanf2)
* Original Keyboard Maintainer: [Tony Finch](https://github.com/fanf2)
* Keyboard Maintainer: [Wilfried Jeanniard](https://github.com/willoucom)
* Hardware Supported: Keybow 2040
* Hardware Availability: [Pimoroni][keybow2040]

[keybow2040]: https://shop.pimoroni.com/products/keybow-2040
* Hardware Availability: [Pimoroni](https://shop.pimoroni.com/products/keybow-2040)

Make example for this keyboard (after setting up your build environment):

Expand All @@ -20,61 +19,17 @@ Flashing example for this keyboard:

make pimoroni/keybow2040:default:flash


See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools)
and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide)
for more information. Brand new to QMK? Start with our
[Complete Newbs Guide](https://docs.qmk.fm/#/newbs).


## bootloader

The procedure to flash the firmware is similar to other RP2040
devices. You can enter the bootloader in two ways:

* **Vulcan nerve pinch**: hold down BOOTSEL while pressing RESET
(not so great if you have configured BOOTSEL to do something)

* **Mr Resetti double-tap**: press RESET twice quickly
(only works when running the QMK firmware)

The Pimoroni web site has [instructions for reinstalling CircuitPython
on the Keybow 2040](https://learn.pimoroni.com/article/circuitpython-and-keybow-2040)


## notes

* The BOOTSEL button doubles as a 17th configurable key. The
RP2040's ROM firmware implements the BOOTSEL feature, so there's
no need for QMK's bootmagic feature.

* The default keymap has F13 - F20 on the top half of the board
(nearest the USB socket), and a navigation cluster (arrows, home,
end, page up/down) on the bottom half. The BOOTSEL button changes
the RGB matrix mode.

* The Keybow 2040 CircuitPython firmware uses VID = 0x16D0, PID = 0x08C6,
but this QMK firmware has different USB IDs to avoid confusing drivers:
VID = 0x5069 ('Pi'), PID = 0x4784 (4 'x' 4)


## resources

Here are some links to the information I used when configuring QMK for the Keybow 2040.

* [Piomoroni Keybow 2040 product page](https://shop.pimoroni.com/products/keybow-2040)
* [Keybow 2040 assembly instructions](https://learn.pimoroni.com/article/assembling-keybow-2040)

Places to find information about the Keybow 2040 hardware:

* [schematic](https://cdn.shopify.com/s/files/1/0174/1800/files/keybow_2040_schematic.pdf)
* contains most of the information that can also be gleaned from the CircuitPython support

* Pimoroni user-friendly CircuitPython libraries
* [old](https://github.com/pimoroni/keybow2040-circuitpython) and [new](https://github.com/pimoroni/pmk-circuitpython)
* these are wrappers around the low-level support below
## Bootloader

* [CircuitPython hardware support](https://github.com/adafruit/circuitpython/blob/main/ports/raspberrypi/boards/pimoroni_keybow2040/)
* defines map from hardware feature names (e.g. `SW15`) to the way they are accessed (e.g. GPIO6)
Enter the bootloader in 3 ways:

* [CircuitPython IS31FL3731 driver](https://github.com/adafruit/Adafruit_CircuitPython_IS31FL3731/blob/main/adafruit_is31fl3731/keybow2040.py)
* defines the RGB matrix layout
* **Bootmagic reset**: Hold down the top left key and plug in the keyboard
* **Physical reset button**: Hold down BOOTSEL while pressing RESET
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
1 change: 0 additions & 1 deletion keyboards/pimoroni/keybow2040/rules.mk

This file was deleted.

0 comments on commit f322d39

Please sign in to comment.