drivers: remove direct `quantum.h` includes (#21473)

This commit is contained in:
Ryan 2023-07-09 20:03:50 +10:00 committed by GitHub
parent 726132fb69
commit b6d9409d2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 30 additions and 23 deletions

View File

@ -16,7 +16,7 @@
*/ */
#include "apa102.h" #include "apa102.h"
#include "quantum.h" #include "gpio.h"
#ifndef APA102_NOPS #ifndef APA102_NOPS
# if defined(__AVR__) # if defined(__AVR__)

View File

@ -10,7 +10,7 @@
#pragma once #pragma once
#include "quantum.h" //to get is_keyboard_left #include "keyboard.h"
#include <stdint.h> #include <stdint.h>
#include "spi_master.h" #include "spi_master.h"
#include "util.h" #include "util.h"

View File

@ -1,9 +1,10 @@
// Copyright 2022 Stefan Kerkmann // Copyright 2022 Stefan Kerkmann
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
#include "quantum.h"
#include "hal.h" #include "hal.h"
#include "bootloader.h" #include "bootloader.h"
#include "gpio.h"
#include "wait.h"
#include "pico/bootrom.h" #include "pico/bootrom.h"
#if !defined(RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED) #if !defined(RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED)

View File

@ -24,8 +24,10 @@
* STM32_I2C_USE_I2C1 is TRUE in the mcuconf.h file. Pins B6 and B7 are used * 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. * but using any other I2C pins should be trivial.
*/ */
#include "quantum.h"
#include "i2c_master.h" #include "i2c_master.h"
#include "gpio.h"
#include "chibios_config.h"
#include <string.h> #include <string.h>
#include <ch.h> #include <ch.h>
#include <hal.h> #include <hal.h>

View File

@ -2,8 +2,8 @@
* WARNING: be careful changing this code, it is very timing dependent * WARNING: be careful changing this code, it is very timing dependent
*/ */
#include "quantum.h"
#include "serial.h" #include "serial.h"
#include "gpio.h"
#include "wait.h" #include "wait.h"
#include "synchronization_util.h" #include "synchronization_util.h"

View File

@ -3,10 +3,8 @@
#include <ch.h> #include <ch.h>
#include "quantum.h"
#include "serial.h" #include "serial.h"
#include "serial_protocol.h" #include "serial_protocol.h"
#include "printf.h"
#include "synchronization_util.h" #include "synchronization_util.h"
static inline bool initiate_transaction(uint8_t transaction_id); static inline bool initiate_transaction(uint8_t transaction_id);

View File

@ -5,6 +5,7 @@
#include "serial_usart.h" #include "serial_usart.h"
#include "serial_protocol.h" #include "serial_protocol.h"
#include "synchronization_util.h" #include "synchronization_util.h"
#include "chibios_config.h"
#if defined(SERIAL_USART_CONFIG) #if defined(SERIAL_USART_CONFIG)
static QMKSerialConfig serial_config = SERIAL_USART_CONFIG; static QMKSerialConfig serial_config = SERIAL_USART_CONFIG;

View File

@ -3,7 +3,6 @@
#pragma once #pragma once
#include "quantum.h"
#include "serial.h" #include "serial.h"
#include <hal.h> #include <hal.h>

View File

@ -16,8 +16,6 @@
#include "uart.h" #include "uart.h"
#include "quantum.h"
#if defined(MCU_KINETIS) #if defined(MCU_KINETIS)
static SerialConfig serialConfig = {SERIAL_DEFAULT_BITRATE}; static SerialConfig serialConfig = {SERIAL_DEFAULT_BITRATE};
#elif defined(WB32F3G71xx) || defined(WB32FQ95xx) #elif defined(WB32F3G71xx) || defined(WB32FQ95xx)

View File

@ -17,6 +17,7 @@
#pragma once #pragma once
#include <stdint.h> #include <stdint.h>
#include <stdbool.h>
#include <hal.h> #include <hal.h>

View File

@ -1,12 +1,10 @@
// Copyright 2022 Marek Kraus (@gamelaster) // Copyright 2022 Marek Kraus (@gamelaster)
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
#include "quantum.h"
#include "hardware/pio.h" #include "hardware/pio.h"
#include "hardware/clocks.h" #include "hardware/clocks.h"
#include "ps2.h" #include "ps2.h"
#include "print.h" #include "debug.h"
#if !defined(MCU_RP) #if !defined(MCU_RP)
# error PIO Driver is only available for Raspberry Pi 2040 MCUs! # error PIO Driver is only available for Raspberry Pi 2040 MCUs!

View File

@ -1,11 +1,12 @@
// Copyright 2022 Stefan Kerkmann // Copyright 2022 Stefan Kerkmann
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
#include "quantum.h"
#include "serial_usart.h" #include "serial_usart.h"
#include "serial_protocol.h" #include "serial_protocol.h"
#include "hardware/pio.h" #include "hardware/pio.h"
#include "hardware/clocks.h" #include "hardware/clocks.h"
#include "wait.h"
#include "debug.h"
#if !defined(MCU_RP) #if !defined(MCU_RP)
# error PIO Driver is only available for Raspberry Pi 2040 MCUs! # error PIO Driver is only available for Raspberry Pi 2040 MCUs!

View File

@ -2,13 +2,19 @@
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
#include "ws2812.h" #include "ws2812.h"
#include "hardware/timer.h"
#include "hardware/clocks.h"
// Keep this exact include order otherwise we run into naming conflicts between // Keep this exact include order otherwise we run into naming conflicts between
// pico-sdk and rp2040.h which we don't control. // 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 "hardware/pio.h"
#include "gpio.h"
#include "debug.h"
#include "wait.h"
#include "util.h"
#if !defined(MCU_RP) #if !defined(MCU_RP)
# error PIO Driver is only available for Raspberry Pi 2040 MCUs! # error PIO Driver is only available for Raspberry Pi 2040 MCUs!
#endif #endif

View File

@ -1,7 +1,7 @@
#include "quantum.h"
#include "ws2812.h" #include "ws2812.h"
#include <ch.h>
#include <hal.h> #include "gpio.h"
#include "chibios_config.h"
/* Adapted from https://github.com/bigjosh/SimpleNeoPixelDemo/ */ /* Adapted from https://github.com/bigjosh/SimpleNeoPixelDemo/ */

View File

@ -1,6 +1,6 @@
#include "ws2812.h" #include "ws2812.h"
#include "quantum.h" #include "gpio.h"
#include <hal.h> #include "chibios_config.h"
/* Adapted from https://github.com/joewa/WS2812-LED-Driver_ChibiOS/ */ /* Adapted from https://github.com/joewa/WS2812-LED-Driver_ChibiOS/ */

View File

@ -1,5 +1,7 @@
#include "quantum.h"
#include "ws2812.h" #include "ws2812.h"
#include "gpio.h"
#include "util.h"
#include "chibios_config.h"
/* Adapted from https://github.com/gamazeps/ws2812b-chibios-SPIDMA/ */ /* Adapted from https://github.com/gamazeps/ws2812b-chibios-SPIDMA/ */