Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RP2040] update i2c drivers to reflect peripheral number #19277

Merged
merged 1 commit into from
Dec 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/platformdev_rp2040.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ QMK RP2040 support builds upon ChibiOS and thus follows their convention for act

| RP2040 Peripheral | `mcuconf.h` values | `I2C_DRIVER` |
| ----------------- | ------------------ | ------------ |
| `I2C0` | `RP_I2C_USE_I2C0` | `I2CD1` |
| `I2C1` | `RP_I2C_USE_I2C1` | `I2CD2` |
| `I2C0` | `RP_I2C_USE_I2C0` | `I2CD0` |
| `I2C1` | `RP_I2C_USE_I2C1` | `I2CD1` |

To configure the I2C driver please read the [ChibiOS/ARM](i2c_driver.md#arm-configuration) section.

Expand Down Expand Up @@ -74,7 +74,7 @@ This is the default board that is chosen, unless any other RP2040 board is selec
| Driver configuration define | Value |
| -------------------------------------------------------------------------- | ------------------------------------ |
| **I2C driver** | |
| `I2C_DRIVER` | `I2CD2` |
| `I2C_DRIVER` | `I2CD1` |
| `I2C1_SDA_PIN` | `GP2` |
| `I2C1_SCL_PIN` | `GP3` |
| **SPI driver** | |
Expand Down
4 changes: 2 additions & 2 deletions keyboards/1upkeyboards/pi40/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# define OLED_DISPLAY_128X32
#define I2C1_SCL_PIN GP17
#define I2C1_SDA_PIN GP16
#define I2C_DRIVER I2CD1
#define I2C_DRIVER I2CD0
#define OLED_BRIGHTNESS 128
#define OLED_FONT_H "keyboards/1upkeyboards/pi40/lib/glcdfont.c"
#endif
Expand Down Expand Up @@ -96,4 +96,4 @@

/* Bootmagic Lite key configuration */
#define BOOTMAGIC_LITE_ROW 0
#define BOOTMAGIC_LITE_COLUMN 0
#define BOOTMAGIC_LITE_COLUMN 0
2 changes: 1 addition & 1 deletion keyboards/anavi/knob1/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U


#define I2C_DRIVER I2CD2
#define I2C_DRIVER I2CD1
#define I2C1_SDA_PIN GP6
#define I2C1_SCL_PIN GP7

Expand Down
2 changes: 1 addition & 1 deletion keyboards/boardsource/lulu/rp2040/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
#define SERIAL_USART_FULL_DUPLEX
#define SERIAL_USART_TX_PIN GP0
#define SERIAL_USART_RX_PIN GP1
#define I2C_DRIVER I2CD2
#define I2C_DRIVER I2CD1
#define I2C1_SDA_PIN GP22
#define I2C1_SCL_PIN GP23
2 changes: 1 addition & 1 deletion keyboards/controllerworks/mini36/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
#define SPLIT_LED_STATE_ENABLE
#define SPLIT_MODS_ENABLE

#define I2C_DRIVER I2CD1
#define I2C_DRIVER I2CD0
#define I2C1_SCL_PIN GP25
#define I2C1_SDA_PIN GP24
2 changes: 1 addition & 1 deletion keyboards/controllerworks/mini42/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#define SPLIT_MODS_ENABLE

#undef I2C_DRIVER
#define I2C_DRIVER I2CD1
#define I2C_DRIVER I2CD0
#undef I2C1_SCL_PIN
#define I2C1_SCL_PIN GP25
#undef I2C1_SDA_PIN
Expand Down
2 changes: 1 addition & 1 deletion keyboards/handwired/onekey/kb2040/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

// 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 I2C_DRIVER I2CD0
#define I2C1_SDA_PIN GP12
#define I2C1_SCL_PIN GP13

2 changes: 1 addition & 1 deletion keyboards/keebio/sinc/rev3/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define SERIAL_USART_PIN_SWAP
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U
#define I2C_DRIVER I2CD2
#define I2C_DRIVER I2CD1
#define I2C1_SCL_PIN GP22
#define I2C1_SDA_PIN GP23

Expand Down
2 changes: 1 addition & 1 deletion lib/chibios-contrib
Submodule chibios-contrib updated 164 files
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*========================**/

#if !defined(I2C_DRIVER)
# define I2C_DRIVER I2CD2
# define I2C_DRIVER I2CD1
#endif

#if !defined(I2C1_SDA_PIN)
Expand Down
2 changes: 1 addition & 1 deletion platforms/chibios/boards/QMK_PM2040/configs/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#pragma once

#ifndef I2C_DRIVER
# define I2C_DRIVER I2CD2
# define I2C_DRIVER I2CD1
#endif
#ifndef I2C1_SDA_PIN
# define I2C1_SDA_PIN D1
Expand Down