From 400e248b4fe67af70bd8a2d486582a04a1b5536b Mon Sep 17 00:00:00 2001 From: Qubot <1445788683@qq.com> Date: Thu, 25 Jun 2026 20:36:00 +0800 Subject: [PATCH] Disable meowboy buzzer --- components/retro-go/config.h | 4 +--- components/retro-go/drivers/audio/buzzer.c | 18 ++++-------------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/components/retro-go/config.h b/components/retro-go/config.h index fb89cb07..d5307705 100644 --- a/components/retro-go/config.h +++ b/components/retro-go/config.h @@ -42,9 +42,7 @@ #if defined(RG_TARGET_MEOWBOY) #undef RG_AUDIO_USE_BUZZER_PIN -#define RG_AUDIO_USE_BUZZER_PIN 14 -#define RG_AUDIO_BUZZER_LEDC_CHANNEL LEDC_CHANNEL_1 -#define RG_AUDIO_BUZZER_LEDC_TIMER LEDC_TIMER_1 +#define RG_AUDIO_USE_BUZZER_PIN 0 #endif #ifndef RG_PROJECT_NAME #define RG_PROJECT_NAME "Retro-Go" diff --git a/components/retro-go/drivers/audio/buzzer.c b/components/retro-go/drivers/audio/buzzer.c index 409cf612..9627b88c 100644 --- a/components/retro-go/drivers/audio/buzzer.c +++ b/components/retro-go/drivers/audio/buzzer.c @@ -53,19 +53,9 @@ Note that there are some restrictions on how high the PWM frequency can be, and #define SOURCE_CLOCK_MIN_DIVIDER 2 // divider must be [2-65536], according to the docs #define SOURCE_CLOCK_FREQUENCY 80000000 #define SOURCE_CLOCK_MAX_FREQUENCY SOURCE_CLOCK_FREQUENCY/SOURCE_CLOCK_MIN_DIVIDER -#ifndef RG_AUDIO_BUZZER_LEDC_SPEED_MODE -#define RG_AUDIO_BUZZER_LEDC_SPEED_MODE LEDC_LOW_SPEED_MODE -#endif -#ifndef RG_AUDIO_BUZZER_LEDC_CHANNEL -#define RG_AUDIO_BUZZER_LEDC_CHANNEL LEDC_CHANNEL_0 -#endif -#ifndef RG_AUDIO_BUZZER_LEDC_TIMER -#define RG_AUDIO_BUZZER_LEDC_TIMER LEDC_TIMER_0 -#endif - -#define LEDC_PWM_SPEED_MODE RG_AUDIO_BUZZER_LEDC_SPEED_MODE -#define LEDC_PWM_CHANNEL RG_AUDIO_BUZZER_LEDC_CHANNEL -#define LEDC_PWM_TIMER RG_AUDIO_BUZZER_LEDC_TIMER +#define LEDC_PWM_SPEED_MODE LEDC_LOW_SPEED_MODE +#define LEDC_PWM_CHANNEL LEDC_CHANNEL_0 +#define LEDC_PWM_TIMER LEDC_TIMER_0 #define GENERAL_PURPOSE_TIMER_GROUP TIMER_GROUP_0 #define GENERAL_PURPOSE_TIMER TIMER_0 @@ -189,7 +179,7 @@ static bool buzzer_init(int device, int sampleRate) precompute_sine_wave(sampleRate); #endif - sampleQueue = xQueueCreate(cacheSamples*2, sizeof(int16_t)); + sampleQueue = xQueueCreate(cacheSamples*2, sizeof(int16_t*)); if (!sampleQueue) { RG_LOGE("could not create sampleQueue"); return false;