Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tmk_core: remove direct quantum.h includes #21465

Merged
merged 2 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion tmk_core/protocol/arm_atsam/main_arm_atsam.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions tmk_core/protocol/arm_atsam/md_rgb_matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
8 changes: 2 additions & 6 deletions tmk_core/protocol/arm_atsam/md_rgb_matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -200,5 +198,3 @@ void md_led_changed(void);
#else
extern uint8_t gcr_desired;
#endif // USE_MASSDROP_CONFIGURATOR

#endif //_LED_MATRIX_H_
1 change: 1 addition & 0 deletions tmk_core/protocol/arm_atsam/md_rgb_matrix_programs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = {
Expand Down
2 changes: 1 addition & 1 deletion tmk_core/protocol/lufa/lufa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
6 changes: 5 additions & 1 deletion tmk_core/protocol/usb_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions tmk_core/protocol/usb_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);