kopia lustrzana https://github.com/raspberrypi/pico-extras
Allow overriding of default config (#92)
rodzic
4ccfef6fe0
commit
77c3d5e2b6
|
@ -68,8 +68,8 @@ const audio_pwm_channel_config_t default_left_channel_config =
|
|||
{
|
||||
.core = {
|
||||
.base_pin = PICO_AUDIO_PWM_L_PIN,
|
||||
.pio_sm = 0,
|
||||
.dma_channel = 0
|
||||
.pio_sm = PICO_AUDIO_PWM_L_PIO_SM,
|
||||
.dma_channel = PICO_AUDIO_PWM_L_DMA_CH
|
||||
},
|
||||
.pattern = 1,
|
||||
};
|
||||
|
@ -78,8 +78,8 @@ const audio_pwm_channel_config_t default_right_channel_config =
|
|||
{
|
||||
.core = {
|
||||
.base_pin = PICO_AUDIO_PWM_R_PIN,
|
||||
.pio_sm = 1,
|
||||
.dma_channel = 1
|
||||
.pio_sm = PICO_AUDIO_PWM_R_PIO_SM,
|
||||
.dma_channel = PICO_AUDIO_PWM_R_DMA_CH,
|
||||
},
|
||||
.pattern = 1,
|
||||
};
|
||||
|
@ -88,8 +88,8 @@ const audio_pwm_channel_config_t default_mono_channel_config =
|
|||
{
|
||||
.core = {
|
||||
.base_pin = PICO_AUDIO_PWM_MONO_PIN,
|
||||
.pio_sm = 0,
|
||||
.dma_channel = 0
|
||||
.pio_sm = PICO_AUDIO_PWM_MONO_PIO_SM,
|
||||
.dma_channel = PICO_AUDIO_PWM_MONO_DMA_CH
|
||||
},
|
||||
.pattern = 3,
|
||||
};
|
||||
|
|
|
@ -84,14 +84,38 @@ extern "C" {
|
|||
#define PICO_AUDIO_PWM_L_PIN 0
|
||||
#endif
|
||||
|
||||
#ifndef PICO_AUDIO_PWM_L_PIO_SM
|
||||
#define PICO_AUDIO_PWM_L_PIO_SM 0
|
||||
#endif
|
||||
|
||||
#ifndef PICO_AUDIO_PWM_L_DMA_CH
|
||||
#define PICO_AUDIO_PWM_L_DMA_CH 0
|
||||
#endif
|
||||
|
||||
#ifndef PICO_AUDIO_PWM_R_PIN
|
||||
#define PICO_AUDIO_PWM_R_PIN 1
|
||||
#endif
|
||||
|
||||
#ifndef PICO_AUDIO_PWM_R_PIO_SM
|
||||
#define PICO_AUDIO_PWM_R_PIO_SM 0
|
||||
#endif
|
||||
|
||||
#ifndef PICO_AUDIO_PWM_R_DMA_CH
|
||||
#define PICO_AUDIO_PWM_R_DMA_CH 1
|
||||
#endif
|
||||
|
||||
#ifndef PICO_AUDIO_PWM_MONO_PIN
|
||||
#define PICO_AUDIO_PWM_MONO_PIN PICO_AUDIO_PWM_L_PIN
|
||||
#endif
|
||||
|
||||
#ifndef PICO_AUDIO_PWM_MONO_PIO_SM
|
||||
#define PICO_AUDIO_PWM_MONO_PIO_SM PICO_AUDIO_PWM_L_PIO_SM
|
||||
#endif
|
||||
|
||||
#ifndef PICO_AUDIO_PWM_MONO_DMA_CH
|
||||
#define PICO_AUDIO_PWM_MONO_DMA_CH PICO_AUDIO_PWM_L_DMA_CH
|
||||
#endif
|
||||
|
||||
#ifndef PIO_AUDIO_PWM_INTERP_SAVE
|
||||
#define PIO_AUDIO_PWM_INTERP_SAVE 1
|
||||
#endif
|
||||
|
|
Ładowanie…
Reference in New Issue