[Core] Adjust PWM hardware audio driver for RP2040 (#17723)

This commit is contained in:
Stefan Kerkmann
2022-10-27 19:26:16 +02:00
committed by GitHub
parent efe520645e
commit 19145704e4
22 changed files with 94 additions and 145 deletions

View File

@@ -60,7 +60,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define AUDIO_PWM_DRIVER PWMD3
#define AUDIO_PWM_CHANNEL 4
#define AUDIO_PWM_PAL_MODE 2
#define AUDIO_STATE_TIMER GPTD4
/* serial.c configuration for split keyboard */
#undef SOFT_SERIAL_PIN

View File

@@ -21,6 +21,5 @@
#define HAL_USE_SPI TRUE
#define SPI_USE_WAIT TRUE
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#define HAL_USE_GPT TRUE
#include_next <halconf.h>

View File

@@ -38,8 +38,5 @@
#undef STM32_SERIAL_USE_USART2
#define STM32_SERIAL_USE_USART2 TRUE
#undef STM32_GPT_USE_TIM4
#define STM32_GPT_USE_TIM4 TRUE
#undef STM32_ST_USE_TIMER
#define STM32_ST_USE_TIMER 5

View File

@@ -56,7 +56,6 @@
#define AUDIO_PWM_DRIVER PWMD4
#define AUDIO_PWM_CHANNEL 2
#define AUDIO_PWM_PAL_MODE 2
#define AUDIO_STATE_TIMER GPTD3
#define AUDIO_INIT_DELAY
#define AUDIO_ENABLE_TONE_MULTIPLEXING
#define AUDIO_TONE_MULTIPLEXING_RATE_DEFAULT 10

View File

@@ -17,7 +17,6 @@
#define HAL_USE_PWM TRUE
#define HAL_USE_PAL TRUE
#define HAL_USE_GPT TRUE
#define HAL_USE_SERIAL TRUE
// #define HAL_USE_I2C TRUE
#define HAL_USE_SPI TRUE

View File

@@ -36,8 +36,5 @@
#undef STM32_SERIAL_USE_USART1
#define STM32_SERIAL_USE_USART1 TRUE
#undef STM32_GPT_USE_TIM3
#define STM32_GPT_USE_TIM3 TRUE
#undef STM32_ST_USE_TIMER
#define STM32_ST_USE_TIMER 5

View File

@@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define AUDIO_PWM_DRIVER PWMD2
#define AUDIO_PWM_CHANNEL 3
#define AUDIO_PWM_PAL_MODE 1
#define AUDIO_STATE_TIMER GPTD1
#define AUDIO_CLICKY
#define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f

View File

@@ -23,6 +23,5 @@
#pragma once
#define HAL_USE_PWM TRUE
#define HAL_USE_GPT TRUE
#include_next <halconf.h>

View File

@@ -23,8 +23,5 @@
#undef STM32_PWM_USE_TIM4
#define STM32_PWM_USE_TIM4 TRUE
#undef STM32_GPT_USE_TIM1
#define STM32_GPT_USE_TIM1 TRUE
#undef STM32_ST_USE_TIMER
#define STM32_ST_USE_TIMER 5

View File

@@ -16,3 +16,7 @@
#define BACKLIGHT_PWM_DRIVER PWMD4
#define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_B
#define AUDIO_PIN GP16
#define AUDIO_PWM_DRIVER PWMD0
#define AUDIO_PWM_CHANNEL RP2040_PWM_CHANNEL_A

View File

@@ -5,5 +5,8 @@
#include_next "mcuconf.h"
#undef RP_PWM_USE_PWM0
#define RP_PWM_USE_PWM0 TRUE
#undef RP_PWM_USE_PWM4
#define RP_PWM_USE_PWM4 TRUE

View File

@@ -53,7 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define AUDIO_PWM_DRIVER PWMD3
#define AUDIO_PWM_CHANNEL 4
#define AUDIO_PWM_PAL_MODE 2
#define AUDIO_STATE_TIMER GPTD4
/* serial.c configuration for split keyboard */
#define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode.

View File

@@ -21,6 +21,5 @@
#define HAL_USE_SPI TRUE
#define SPI_USE_WAIT TRUE
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#define HAL_USE_GPT TRUE
#include_next <halconf.h>

View File

@@ -38,8 +38,5 @@
#undef STM32_SERIAL_USE_USART2
#define STM32_SERIAL_USE_USART2 TRUE
#undef STM32_GPT_USE_TIM4
#define STM32_GPT_USE_TIM4 TRUE
#undef STM32_ST_USE_TIMER
#define STM32_ST_USE_TIMER 5

View File

@@ -46,7 +46,6 @@
#define AUDIO_PWM_PAL_MODE 1
#define AUDIO_PWM_DRIVER PWMD1
#define AUDIO_PWM_CHANNEL 1
#define AUDIO_STATE_TIMER GPTD4
/* RGB LED */
#define RGB_DI_PIN B1

View File

@@ -18,9 +18,6 @@
/* PWM for AUDIO and RGB LED */
#define HAL_USE_PWM TRUE
/* GPT and PAL for Audio */
#define HAL_USE_GPT TRUE
#define HAL_USE_PAL TRUE
/* I2C for OLED display */
#define HAL_USE_I2C TRUE

View File

@@ -21,9 +21,6 @@
/* TIM1 PWM used for audio driver */
#undef STM32_PWM_USE_TIM1
#define STM32_PWM_USE_TIM1 TRUE
/* TIM5 GPT used for audio driver */
#undef STM32_GPT_USE_TIM4
#define STM32_GPT_USE_TIM4 TRUE
/* TIM3 used for WS2812 driver */
#undef STM32_PWM_USE_TIM3