From da2d2f947d5c30aebea17f414fb22ad50fe5410b Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 16 Jul 2023 23:42:56 +1000 Subject: quantum: remove direct `quantum.h` includes (#21507) --- platforms/avr/drivers/audio_pwm_hardware.c | 8 ++------ platforms/chibios/drivers/audio_dac_additive.c | 5 +++-- platforms/chibios/drivers/audio_dac_basic.c | 3 +-- platforms/chibios/drivers/audio_pwm_hardware.c | 3 +-- platforms/chibios/drivers/audio_pwm_software.c | 3 +-- 5 files changed, 8 insertions(+), 14 deletions(-) (limited to 'platforms') diff --git a/platforms/avr/drivers/audio_pwm_hardware.c b/platforms/avr/drivers/audio_pwm_hardware.c index 2fc448ea58..6799cf2fdd 100644 --- a/platforms/avr/drivers/audio_pwm_hardware.c +++ b/platforms/avr/drivers/audio_pwm_hardware.c @@ -15,13 +15,9 @@ * along with this program. If not, see . */ -#if defined(__AVR__) -# include -# include -# include -#endif - #include "audio.h" +#include "gpio.h" +#include extern bool playing_note; extern bool playing_melody; diff --git a/platforms/chibios/drivers/audio_dac_additive.c b/platforms/chibios/drivers/audio_dac_additive.c index d29147ca3b..9a5fe4c336 100644 --- a/platforms/chibios/drivers/audio_dac_additive.c +++ b/platforms/chibios/drivers/audio_dac_additive.c @@ -16,8 +16,9 @@ */ #include "audio.h" -#include -#include +#include "gpio.h" +#include +#include "util.h" // Need to disable GCC's "tautological-compare" warning for this file, as it causes issues when running `KEEP_INTERMEDIATES=yes`. Corresponding pop at the end of the file. #pragma GCC diagnostic push diff --git a/platforms/chibios/drivers/audio_dac_basic.c b/platforms/chibios/drivers/audio_dac_basic.c index 4ea23a2158..9a3f3fea1f 100644 --- a/platforms/chibios/drivers/audio_dac_basic.c +++ b/platforms/chibios/drivers/audio_dac_basic.c @@ -16,8 +16,7 @@ */ #include "audio.h" -#include "ch.h" -#include "hal.h" +#include "gpio.h" // Need to disable GCC's "tautological-compare" warning for this file, as it causes issues when running `KEEP_INTERMEDIATES=yes`. Corresponding pop at the end of the file. #pragma GCC diagnostic push diff --git a/platforms/chibios/drivers/audio_pwm_hardware.c b/platforms/chibios/drivers/audio_pwm_hardware.c index 54dac46605..40d891326f 100644 --- a/platforms/chibios/drivers/audio_pwm_hardware.c +++ b/platforms/chibios/drivers/audio_pwm_hardware.c @@ -12,8 +12,7 @@ // function. #include "audio.h" -#include "ch.h" -#include "hal.h" +#include "gpio.h" #if !defined(AUDIO_PIN) # error "Audio feature enabled, but no pin selected - see docs/feature_audio under the ARM PWM settings" diff --git a/platforms/chibios/drivers/audio_pwm_software.c b/platforms/chibios/drivers/audio_pwm_software.c index e01f86ea52..663a9eca16 100644 --- a/platforms/chibios/drivers/audio_pwm_software.c +++ b/platforms/chibios/drivers/audio_pwm_software.c @@ -25,8 +25,7 @@ this driver uses the chibios-PWM system to produce a square-wave on any given ou */ #include "audio.h" -#include "ch.h" -#include "hal.h" +#include "gpio.h" #if !defined(AUDIO_PIN) # error "Audio feature enabled, but no pin selected - see docs/feature_audio under the ARM PWM settings" -- cgit v1.2.3