qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

commit 30de598650f368e215ad5f82c7b9de52eceb539e
parent d83578dbe4df0e77112b673265445d37fd231b93
Author: Ryan <fauxpark@gmail.com>
Date:   Fri,  7 Jul 2023 21:24:07 +1000

tmk_core: remove direct `quantum.h` includes (#21465)


Diffstat:
Mtmk_core/protocol/arm_atsam/main_arm_atsam.c | 1-
Mtmk_core/protocol/arm_atsam/md_rgb_matrix.c | 1+
Mtmk_core/protocol/arm_atsam/md_rgb_matrix.h | 8++------
Mtmk_core/protocol/arm_atsam/md_rgb_matrix_programs.c | 1+
Mtmk_core/protocol/lufa/lufa.c | 2+-
Mtmk_core/protocol/usb_util.c | 6+++++-
Mtmk_core/protocol/usb_util.h | 3+++
7 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/tmk_core/protocol/arm_atsam/main_arm_atsam.c b/tmk_core/protocol/arm_atsam/main_arm_atsam.c @@ -23,7 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "host_driver.h" #include "keycode_config.h" #include <string.h> -#include "quantum.h" // From protocol directory #include "arm_atsam_protocol.h" diff --git a/tmk_core/protocol/arm_atsam/md_rgb_matrix.c b/tmk_core/protocol/arm_atsam/md_rgb_matrix.c @@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. # include "arm_atsam_protocol.h" # include "led.h" # include "rgb_matrix.h" +# include "eeprom.h" # include <string.h> # include <math.h> diff --git a/tmk_core/protocol/arm_atsam/md_rgb_matrix.h b/tmk_core/protocol/arm_atsam/md_rgb_matrix.h @@ -15,11 +15,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _LED_MATRIX_H_ -#define _LED_MATRIX_H_ +#pragma once -#include "quantum.h" -#include "eeprom.h" +#include <stdint.h> // From keyboard #include "config_led.h" @@ -200,5 +198,3 @@ void md_led_changed(void); #else extern uint8_t gcr_desired; #endif // USE_MASSDROP_CONFIGURATOR - -#endif //_LED_MATRIX_H_ diff --git a/tmk_core/protocol/arm_atsam/md_rgb_matrix_programs.c b/tmk_core/protocol/arm_atsam/md_rgb_matrix_programs.c @@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. # ifdef USE_MASSDROP_CONFIGURATOR # include "md_rgb_matrix.h" +# include "util.h" // Teal <-> Salmon led_setup_t leds_teal_salmon[] = { diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c @@ -48,10 +48,10 @@ # include "sleep_led.h" #endif #include "suspend.h" +#include "wait.h" #include "usb_descriptor.h" #include "lufa.h" -#include "quantum.h" #include "usb_device_state.h" #include <util/atomic.h> diff --git a/tmk_core/protocol/usb_util.c b/tmk_core/protocol/usb_util.c @@ -13,13 +13,17 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "quantum.h" + #include "usb_util.h" +#include "gpio.h" +#include "wait.h" __attribute__((weak)) void usb_disconnect(void) {} + __attribute__((weak)) bool usb_connected_state(void) { return true; } + __attribute__((weak)) bool usb_vbus_state(void) { #ifdef USB_VBUS_PIN setPinInput(USB_VBUS_PIN); diff --git a/tmk_core/protocol/usb_util.h b/tmk_core/protocol/usb_util.h @@ -13,10 +13,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ + #pragma once #include <stdbool.h> void usb_disconnect(void); + bool usb_connected_state(void); + bool usb_vbus_state(void);