forked from forks/qmk_firmware
[RP2040] update i2c drivers to reflect peripheral number (#19277)
This commit is contained in:
parent
f67f787cc2
commit
9dc3f79196
|
@ -38,8 +38,8 @@ QMK RP2040 support builds upon ChibiOS and thus follows their convention for act
|
||||||
|
|
||||||
| RP2040 Peripheral | `mcuconf.h` values | `I2C_DRIVER` |
|
| RP2040 Peripheral | `mcuconf.h` values | `I2C_DRIVER` |
|
||||||
| ----------------- | ------------------ | ------------ |
|
| ----------------- | ------------------ | ------------ |
|
||||||
| `I2C0` | `RP_I2C_USE_I2C0` | `I2CD1` |
|
| `I2C0` | `RP_I2C_USE_I2C0` | `I2CD0` |
|
||||||
| `I2C1` | `RP_I2C_USE_I2C1` | `I2CD2` |
|
| `I2C1` | `RP_I2C_USE_I2C1` | `I2CD1` |
|
||||||
|
|
||||||
To configure the I2C driver please read the [ChibiOS/ARM](i2c_driver.md#arm-configuration) section.
|
To configure the I2C driver please read the [ChibiOS/ARM](i2c_driver.md#arm-configuration) section.
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ This is the default board that is chosen, unless any other RP2040 board is selec
|
||||||
| Driver configuration define | Value |
|
| Driver configuration define | Value |
|
||||||
| -------------------------------------------------------------------------- | ------------------------------------ |
|
| -------------------------------------------------------------------------- | ------------------------------------ |
|
||||||
| **I2C driver** | |
|
| **I2C driver** | |
|
||||||
| `I2C_DRIVER` | `I2CD2` |
|
| `I2C_DRIVER` | `I2CD1` |
|
||||||
| `I2C1_SDA_PIN` | `GP2` |
|
| `I2C1_SDA_PIN` | `GP2` |
|
||||||
| `I2C1_SCL_PIN` | `GP3` |
|
| `I2C1_SCL_PIN` | `GP3` |
|
||||||
| **SPI driver** | |
|
| **SPI driver** | |
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# define OLED_DISPLAY_128X32
|
# define OLED_DISPLAY_128X32
|
||||||
#define I2C1_SCL_PIN GP17
|
#define I2C1_SCL_PIN GP17
|
||||||
#define I2C1_SDA_PIN GP16
|
#define I2C1_SDA_PIN GP16
|
||||||
#define I2C_DRIVER I2CD1
|
#define I2C_DRIVER I2CD0
|
||||||
#define OLED_BRIGHTNESS 128
|
#define OLED_BRIGHTNESS 128
|
||||||
#define OLED_FONT_H "keyboards/1upkeyboards/pi40/lib/glcdfont.c"
|
#define OLED_FONT_H "keyboards/1upkeyboards/pi40/lib/glcdfont.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U
|
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U
|
||||||
|
|
||||||
|
|
||||||
#define I2C_DRIVER I2CD2
|
#define I2C_DRIVER I2CD1
|
||||||
#define I2C1_SDA_PIN GP6
|
#define I2C1_SDA_PIN GP6
|
||||||
#define I2C1_SCL_PIN GP7
|
#define I2C1_SCL_PIN GP7
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
#define SERIAL_USART_FULL_DUPLEX
|
#define SERIAL_USART_FULL_DUPLEX
|
||||||
#define SERIAL_USART_TX_PIN GP0
|
#define SERIAL_USART_TX_PIN GP0
|
||||||
#define SERIAL_USART_RX_PIN GP1
|
#define SERIAL_USART_RX_PIN GP1
|
||||||
#define I2C_DRIVER I2CD2
|
#define I2C_DRIVER I2CD1
|
||||||
#define I2C1_SDA_PIN GP22
|
#define I2C1_SDA_PIN GP22
|
||||||
#define I2C1_SCL_PIN GP23
|
#define I2C1_SCL_PIN GP23
|
||||||
|
|
|
@ -33,6 +33,6 @@
|
||||||
#define SPLIT_LED_STATE_ENABLE
|
#define SPLIT_LED_STATE_ENABLE
|
||||||
#define SPLIT_MODS_ENABLE
|
#define SPLIT_MODS_ENABLE
|
||||||
|
|
||||||
#define I2C_DRIVER I2CD1
|
#define I2C_DRIVER I2CD0
|
||||||
#define I2C1_SCL_PIN GP25
|
#define I2C1_SCL_PIN GP25
|
||||||
#define I2C1_SDA_PIN GP24
|
#define I2C1_SDA_PIN GP24
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#define SPLIT_MODS_ENABLE
|
#define SPLIT_MODS_ENABLE
|
||||||
|
|
||||||
#undef I2C_DRIVER
|
#undef I2C_DRIVER
|
||||||
#define I2C_DRIVER I2CD1
|
#define I2C_DRIVER I2CD0
|
||||||
#undef I2C1_SCL_PIN
|
#undef I2C1_SCL_PIN
|
||||||
#define I2C1_SCL_PIN GP25
|
#define I2C1_SCL_PIN GP25
|
||||||
#undef I2C1_SDA_PIN
|
#undef I2C1_SDA_PIN
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
// settings for the oled keyboard demo with Adafruit 0.91" OLED display on the Stemma QT port
|
// settings for the oled keyboard demo with Adafruit 0.91" OLED display on the Stemma QT port
|
||||||
#define OLED_DISPLAY_128X32
|
#define OLED_DISPLAY_128X32
|
||||||
#define I2C_DRIVER I2CD1
|
#define I2C_DRIVER I2CD0
|
||||||
#define I2C1_SDA_PIN GP12
|
#define I2C1_SDA_PIN GP12
|
||||||
#define I2C1_SCL_PIN GP13
|
#define I2C1_SCL_PIN GP13
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#define SERIAL_USART_PIN_SWAP
|
#define SERIAL_USART_PIN_SWAP
|
||||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
|
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
|
||||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U
|
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U
|
||||||
#define I2C_DRIVER I2CD2
|
#define I2C_DRIVER I2CD1
|
||||||
#define I2C1_SCL_PIN GP22
|
#define I2C1_SCL_PIN GP22
|
||||||
#define I2C1_SDA_PIN GP23
|
#define I2C1_SDA_PIN GP23
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit bb8356fb5a3a9bbc1561826f174a9a631c614546
|
Subproject commit 1130173eae6b7402443aff18ad68228acbe25cc4
|
|
@ -8,7 +8,7 @@
|
||||||
*========================**/
|
*========================**/
|
||||||
|
|
||||||
#if !defined(I2C_DRIVER)
|
#if !defined(I2C_DRIVER)
|
||||||
# define I2C_DRIVER I2CD2
|
# define I2C_DRIVER I2CD1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(I2C1_SDA_PIN)
|
#if !defined(I2C1_SDA_PIN)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifndef I2C_DRIVER
|
#ifndef I2C_DRIVER
|
||||||
# define I2C_DRIVER I2CD2
|
# define I2C_DRIVER I2CD1
|
||||||
#endif
|
#endif
|
||||||
#ifndef I2C1_SDA_PIN
|
#ifndef I2C1_SDA_PIN
|
||||||
# define I2C1_SDA_PIN D1
|
# define I2C1_SDA_PIN D1
|
||||||
|
|
Loading…
Reference in a new issue