~ruther/qmk_firmware

b6d9409d2f8eaa9888fce1611bcb9a23d97be150 — Ryan 1 year, 10 months ago 726132f
drivers: remove direct `quantum.h` includes (#21473)

M drivers/led/apa102.c => drivers/led/apa102.c +1 -1
@@ 16,7 16,7 @@
 */

#include "apa102.h"
#include "quantum.h"
#include "gpio.h"

#ifndef APA102_NOPS
#    if defined(__AVR__)

M drivers/sensors/pmw33xx_common.h => drivers/sensors/pmw33xx_common.h +1 -1
@@ 10,7 10,7 @@

#pragma once

#include "quantum.h" //to get is_keyboard_left
#include "keyboard.h"
#include <stdint.h>
#include "spi_master.h"
#include "util.h"

M platforms/chibios/bootloaders/rp2040.c => platforms/chibios/bootloaders/rp2040.c +2 -1
@@ 1,9 1,10 @@
// Copyright 2022 Stefan Kerkmann
// SPDX-License-Identifier: GPL-2.0-or-later

#include "quantum.h"
#include "hal.h"
#include "bootloader.h"
#include "gpio.h"
#include "wait.h"
#include "pico/bootrom.h"

#if !defined(RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED)

M platforms/chibios/drivers/i2c_master.c => platforms/chibios/drivers/i2c_master.c +3 -1
@@ 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>

M platforms/chibios/drivers/serial.c => platforms/chibios/drivers/serial.c +1 -1
@@ 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"


M platforms/chibios/drivers/serial_protocol.c => platforms/chibios/drivers/serial_protocol.c +0 -2
@@ 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);

M platforms/chibios/drivers/serial_usart.c => platforms/chibios/drivers/serial_usart.c +1 -0
@@ 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;

M platforms/chibios/drivers/serial_usart.h => platforms/chibios/drivers/serial_usart.h +0 -1
@@ 3,7 3,6 @@

#pragma once

#include "quantum.h"
#include "serial.h"
#include <hal.h>


M platforms/chibios/drivers/uart.c => platforms/chibios/drivers/uart.c +0 -2
@@ 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)

M platforms/chibios/drivers/uart.h => platforms/chibios/drivers/uart.h +1 -0
@@ 17,6 17,7 @@
#pragma once

#include <stdint.h>
#include <stdbool.h>

#include <hal.h>


M platforms/chibios/drivers/vendor/RP/RP2040/ps2_vendor.c => platforms/chibios/drivers/vendor/RP/RP2040/ps2_vendor.c +1 -3
@@ 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!

M platforms/chibios/drivers/vendor/RP/RP2040/serial_vendor.c => platforms/chibios/drivers/vendor/RP/RP2040/serial_vendor.c +2 -1
@@ 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!

M platforms/chibios/drivers/vendor/RP/RP2040/ws2812_vendor.c => platforms/chibios/drivers/vendor/RP/RP2040/ws2812_vendor.c +9 -3
@@ 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

M platforms/chibios/drivers/ws2812_bitbang.c => platforms/chibios/drivers/ws2812_bitbang.c +3 -3
@@ 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/ */


M platforms/chibios/drivers/ws2812_pwm.c => platforms/chibios/drivers/ws2812_pwm.c +2 -2
@@ 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/ */


M platforms/chibios/drivers/ws2812_spi.c => platforms/chibios/drivers/ws2812_spi.c +3 -1
@@ 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/ */


Do not follow this link