summaryrefslogtreecommitdiffstats
path: root/platforms/chibios/drivers
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-07-09 20:03:50 +1000
committerGitHub <noreply@github.com>2023-07-09 20:03:50 +1000
commitb6d9409d2f8eaa9888fce1611bcb9a23d97be150 (patch)
tree339b716e9eb4a736c26ec6f8d5bf084ca19e829e /platforms/chibios/drivers
parent726132fb6974d92d04bbffd4d43831d3f9aa869a (diff)
drivers: remove direct `quantum.h` includes (#21473)
Diffstat (limited to 'platforms/chibios/drivers')
-rw-r--r--platforms/chibios/drivers/i2c_master.c4
-rw-r--r--platforms/chibios/drivers/serial.c2
-rw-r--r--platforms/chibios/drivers/serial_protocol.c2
-rw-r--r--platforms/chibios/drivers/serial_usart.c1
-rw-r--r--platforms/chibios/drivers/serial_usart.h1
-rw-r--r--platforms/chibios/drivers/uart.c2
-rw-r--r--platforms/chibios/drivers/uart.h1
-rw-r--r--platforms/chibios/drivers/vendor/RP/RP2040/ps2_vendor.c4
-rw-r--r--platforms/chibios/drivers/vendor/RP/RP2040/serial_vendor.c3
-rw-r--r--platforms/chibios/drivers/vendor/RP/RP2040/ws2812_vendor.c12
-rw-r--r--platforms/chibios/drivers/ws2812_bitbang.c6
-rw-r--r--platforms/chibios/drivers/ws2812_pwm.c4
-rw-r--r--platforms/chibios/drivers/ws2812_spi.c4
13 files changed, 26 insertions, 20 deletions
diff --git a/platforms/chibios/drivers/i2c_master.c b/platforms/chibios/drivers/i2c_master.c
index 4c7a5daa17..7c49f9d005 100644
--- a/platforms/chibios/drivers/i2c_master.c
+++ b/platforms/chibios/drivers/i2c_master.c
@@ -24,8 +24,10 @@
* STM32_I2C_USE_I2C1 is TRUE in the mcuconf.h file. Pins B6 and B7 are used
* but using any other I2C pins should be trivial.
*/
-#include "quantum.h"
+
#include "i2c_master.h"
+#include "gpio.h"
+#include "chibios_config.h"
#include <string.h>
#include <ch.h>
#include <hal.h>
diff --git a/platforms/chibios/drivers/serial.c b/platforms/chibios/drivers/serial.c
index 0dd8e71ae8..f087d0c2ed 100644
--- a/platforms/chibios/drivers/serial.c
+++ b/platforms/chibios/drivers/serial.c
@@ -2,8 +2,8 @@
* WARNING: be careful changing this code, it is very timing dependent
*/
-#include "quantum.h"
#include "serial.h"
+#include "gpio.h"
#include "wait.h"
#include "synchronization_util.h"
diff --git a/platforms/chibios/drivers/serial_protocol.c b/platforms/chibios/drivers/serial_protocol.c
index ccaf73282d..e0f583ccde 100644
--- a/platforms/chibios/drivers/serial_protocol.c
+++ b/platforms/chibios/drivers/serial_protocol.c
@@ -3,10 +3,8 @@
#include <ch.h>
-#include "quantum.h"
#include "serial.h"
#include "serial_protocol.h"
-#include "printf.h"
#include "synchronization_util.h"
static inline bool initiate_transaction(uint8_t transaction_id);
diff --git a/platforms/chibios/drivers/serial_usart.c b/platforms/chibios/drivers/serial_usart.c
index 6ebbf7c8ca..767ef8726f 100644
--- a/platforms/chibios/drivers/serial_usart.c
+++ b/platforms/chibios/drivers/serial_usart.c
@@ -5,6 +5,7 @@
#include "serial_usart.h"
#include "serial_protocol.h"
#include "synchronization_util.h"
+#include "chibios_config.h"
#if defined(SERIAL_USART_CONFIG)
static QMKSerialConfig serial_config = SERIAL_USART_CONFIG;
diff --git a/platforms/chibios/drivers/serial_usart.h b/platforms/chibios/drivers/serial_usart.h
index fa062cd736..dec8a292e9 100644
--- a/platforms/chibios/drivers/serial_usart.h
+++ b/platforms/chibios/drivers/serial_usart.h
@@ -3,7 +3,6 @@
#pragma once
-#include "quantum.h"
#include "serial.h"
#include <hal.h>
diff --git a/platforms/chibios/drivers/uart.c b/platforms/chibios/drivers/uart.c
index 34f77232b6..39a59dd445 100644
--- a/platforms/chibios/drivers/uart.c
+++ b/platforms/chibios/drivers/uart.c
@@ -16,8 +16,6 @@
#include "uart.h"
-#include "quantum.h"
-
#if defined(MCU_KINETIS)
static SerialConfig serialConfig = {SERIAL_DEFAULT_BITRATE};
#elif defined(WB32F3G71xx) || defined(WB32FQ95xx)
diff --git a/platforms/chibios/drivers/uart.h b/platforms/chibios/drivers/uart.h
index e9e3b0855b..d1917bfc80 100644
--- a/platforms/chibios/drivers/uart.h
+++ b/platforms/chibios/drivers/uart.h
@@ -17,6 +17,7 @@
#pragma once
#include <stdint.h>
+#include <stdbool.h>
#include <hal.h>
diff --git a/platforms/chibios/drivers/vendor/RP/RP2040/ps2_vendor.c b/platforms/chibios/drivers/vendor/RP/RP2040/ps2_vendor.c
index 937fa5de6f..d775ec29d5 100644
--- a/platforms/chibios/drivers/vendor/RP/RP2040/ps2_vendor.c
+++ b/platforms/chibios/drivers/vendor/RP/RP2040/ps2_vendor.c
@@ -1,12 +1,10 @@
// Copyright 2022 Marek Kraus (@gamelaster)
// SPDX-License-Identifier: GPL-2.0-or-later
-#include "quantum.h"
-
#include "hardware/pio.h"
#include "hardware/clocks.h"
#include "ps2.h"
-#include "print.h"
+#include "debug.h"
#if !defined(MCU_RP)
# error PIO Driver is only available for Raspberry Pi 2040 MCUs!
diff --git a/platforms/chibios/drivers/vendor/RP/RP2040/serial_vendor.c b/platforms/chibios/drivers/vendor/RP/RP2040/serial_vendor.c
index dd4723a086..3aa8e1165f 100644
--- a/platforms/chibios/drivers/vendor/RP/RP2040/serial_vendor.c
+++ b/platforms/chibios/drivers/vendor/RP/RP2040/serial_vendor.c
@@ -1,11 +1,12 @@
// Copyright 2022 Stefan Kerkmann
// SPDX-License-Identifier: GPL-2.0-or-later
-#include "quantum.h"
#include "serial_usart.h"
#include "serial_protocol.h"
#include "hardware/pio.h"
#include "hardware/clocks.h"
+#include "wait.h"
+#include "debug.h"
#if !defined(MCU_RP)
# error PIO Driver is only available for Raspberry Pi 2040 MCUs!
diff --git a/platforms/chibios/drivers/vendor/RP/RP2040/ws2812_vendor.c b/platforms/chibios/drivers/vendor/RP/RP2040/ws2812_vendor.c
index 99a6cfaba9..8d59e13bb2 100644
--- a/platforms/chibios/drivers/vendor/RP/RP2040/ws2812_vendor.c
+++ b/platforms/chibios/drivers/vendor/RP/RP2040/ws2812_vendor.c
@@ -2,13 +2,19 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "ws2812.h"
-#include "hardware/timer.h"
-#include "hardware/clocks.h"
+
// Keep this exact include order otherwise we run into naming conflicts between
// pico-sdk and rp2040.h which we don't control.
-#include "quantum.h"
+#include "hardware/timer.h"
+#include "hardware/clocks.h"
+#include <hal.h>
#include "hardware/pio.h"
+#include "gpio.h"
+#include "debug.h"
+#include "wait.h"
+#include "util.h"
+
#if !defined(MCU_RP)
# error PIO Driver is only available for Raspberry Pi 2040 MCUs!
#endif
diff --git a/platforms/chibios/drivers/ws2812_bitbang.c b/platforms/chibios/drivers/ws2812_bitbang.c
index d05deb1a50..c55e0f654c 100644
--- a/platforms/chibios/drivers/ws2812_bitbang.c
+++ b/platforms/chibios/drivers/ws2812_bitbang.c
@@ -1,7 +1,7 @@
-#include "quantum.h"
#include "ws2812.h"
-#include <ch.h>
-#include <hal.h>
+
+#include "gpio.h"
+#include "chibios_config.h"
/* Adapted from https://github.com/bigjosh/SimpleNeoPixelDemo/ */
diff --git a/platforms/chibios/drivers/ws2812_pwm.c b/platforms/chibios/drivers/ws2812_pwm.c
index 04c8279a97..cfee547a82 100644
--- a/platforms/chibios/drivers/ws2812_pwm.c
+++ b/platforms/chibios/drivers/ws2812_pwm.c
@@ -1,6 +1,6 @@
#include "ws2812.h"
-#include "quantum.h"
-#include <hal.h>
+#include "gpio.h"
+#include "chibios_config.h"
/* Adapted from https://github.com/joewa/WS2812-LED-Driver_ChibiOS/ */
diff --git a/platforms/chibios/drivers/ws2812_spi.c b/platforms/chibios/drivers/ws2812_spi.c
index c28f5007f1..f188576e04 100644
--- a/platforms/chibios/drivers/ws2812_spi.c
+++ b/platforms/chibios/drivers/ws2812_spi.c
@@ -1,5 +1,7 @@
-#include "quantum.h"
#include "ws2812.h"
+#include "gpio.h"
+#include "util.h"
+#include "chibios_config.h"
/* Adapted from https://github.com/gamazeps/ws2812b-chibios-SPIDMA/ */