mirror of
https://github.com/Keychron/qmk_firmware.git
synced 2024-11-25 01:47:10 +06:00
rp2040: *_PAL_MODE overridable for this platform too (#20314)
Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
This commit is contained in:
parent
d783536e0d
commit
368fee9655
|
@ -33,26 +33,40 @@
|
|||
# define RP2040_PWM_CHANNEL_A 1U
|
||||
# define RP2040_PWM_CHANNEL_B 2U
|
||||
|
||||
# define BACKLIGHT_PAL_MODE (PAL_MODE_ALTERNATE_PWM | PAL_RP_PAD_DRIVE12 | PAL_RP_GPIO_OE)
|
||||
# ifndef BACKLIGHT_PAL_MODE
|
||||
# define BACKLIGHT_PAL_MODE (PAL_MODE_ALTERNATE_PWM | PAL_RP_PAD_DRIVE12 | PAL_RP_GPIO_OE)
|
||||
# endif
|
||||
# define BACKLIGHT_PWM_COUNTER_FREQUENCY 1000000
|
||||
# define BACKLIGHT_PWM_PERIOD BACKLIGHT_PWM_COUNTER_FREQUENCY / 2048
|
||||
|
||||
# define AUDIO_PWM_PAL_MODE (PAL_MODE_ALTERNATE_PWM | PAL_RP_PAD_DRIVE12 | PAL_RP_GPIO_OE)
|
||||
# ifndef AUDIO_PWM_PAL_MODE
|
||||
# define AUDIO_PWM_PAL_MODE (PAL_MODE_ALTERNATE_PWM | PAL_RP_PAD_DRIVE12 | PAL_RP_GPIO_OE)
|
||||
# endif
|
||||
# define AUDIO_PWM_COUNTER_FREQUENCY 500000
|
||||
|
||||
# define usb_lld_endpoint_fields
|
||||
|
||||
# define I2C1_SCL_PAL_MODE (PAL_MODE_ALTERNATE_I2C | PAL_RP_PAD_SLEWFAST | PAL_RP_PAD_PUE | PAL_RP_PAD_DRIVE4)
|
||||
# define I2C1_SDA_PAL_MODE I2C1_SCL_PAL_MODE
|
||||
# ifndef I2C1_SCL_PAL_MODE
|
||||
# define I2C1_SCL_PAL_MODE (PAL_MODE_ALTERNATE_I2C | PAL_RP_PAD_SLEWFAST | PAL_RP_PAD_PUE | PAL_RP_PAD_DRIVE4)
|
||||
# endif
|
||||
# ifndef I2C1_SDA_PAL_MODE
|
||||
# define I2C1_SDA_PAL_MODE (PAL_MODE_ALTERNATE_I2C | PAL_RP_PAD_SLEWFAST | PAL_RP_PAD_PUE | PAL_RP_PAD_DRIVE4)
|
||||
# endif
|
||||
|
||||
# define USE_I2CV1_CONTRIB
|
||||
# if !defined(I2C1_CLOCK_SPEED)
|
||||
# define I2C1_CLOCK_SPEED 400000
|
||||
# endif
|
||||
|
||||
# define SPI_SCK_PAL_MODE (PAL_MODE_ALTERNATE_SPI | PAL_RP_PAD_SLEWFAST | PAL_RP_PAD_DRIVE4)
|
||||
# define SPI_MOSI_PAL_MODE SPI_SCK_PAL_MODE
|
||||
# define SPI_MISO_PAL_MODE SPI_SCK_PAL_MODE
|
||||
# ifndef SPI_SCK_PAL_MODE
|
||||
# define SPI_SCK_PAL_MODE (PAL_MODE_ALTERNATE_SPI | PAL_RP_PAD_SLEWFAST | PAL_RP_PAD_DRIVE4)
|
||||
# endif
|
||||
# ifndef SPI_MOSI_PAL_MODE
|
||||
# define SPI_MOSI_PAL_MODE (PAL_MODE_ALTERNATE_SPI | PAL_RP_PAD_SLEWFAST | PAL_RP_PAD_DRIVE4)
|
||||
# endif
|
||||
# ifndef SPI_MISO_PAL_MODE
|
||||
# define SPI_MISO_PAL_MODE (PAL_MODE_ALTERNATE_SPI | PAL_RP_PAD_SLEWFAST | PAL_RP_PAD_DRIVE4)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// STM32 compatibility
|
||||
|
|
Loading…
Reference in New Issue
Block a user