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

Remove quantum.h includes from keyboard code #23394

Merged
merged 1 commit into from
Apr 2, 2024
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
4 changes: 3 additions & 1 deletion keyboards/25keys/cassette42/common/oled_helper.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "oled_helper.h"
#include "quantum.h"
#include "progmem.h"
#include "rgblight.h"
#include "oled_driver.h"
#include <stdio.h>
#include <string.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include QMK_KEYBOARD_H
#include "pimoroni_trackball.h"
#include "i2c_master.h"
#include "action.h"
#include "timer.h"
#include "print.h"

static uint8_t scrolling = 0;
static int16_t x_offset = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@

#pragma once

#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "pointing_device.h"
#include "report.h"

#ifndef TRACKBALL_ADDRESS
# define TRACKBALL_ADDRESS (0x0A << 1)
Expand Down
1 change: 0 additions & 1 deletion keyboards/annepro2/annepro2_ble.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#pragma once

#include "annepro2.h"
#include "quantum.h"

void annepro2_ble_bootload(void);
void annepro2_ble_startup(void);
Expand Down
3 changes: 3 additions & 0 deletions keyboards/cannonkeys/lib/satisfaction75/satisfaction_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#include "satisfaction_core.h"
#include "print.h"
#include "debug.h"
#include "matrix.h"
#include "quantum.h"
#include "encoder.h"

#include <ch.h>
#include <hal.h>
Expand Down
3 changes: 2 additions & 1 deletion keyboards/cannonkeys/lib/satisfaction75/satisfaction_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

#pragma once

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

#include "via.h" // only for EEPROM address
#include "satisfaction_keycodes.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later

#include "satisfaction_core.h"
#include "backlight.h"
#include "eeprom.h"

void pre_encoder_mode_change(void){
Expand Down
8 changes: 8 additions & 0 deletions keyboards/cannonkeys/lib/satisfaction75/satisfaction_oled.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
// SPDX-License-Identifier: GPL-2.0-or-later

#include "satisfaction_core.h"
#include "action_layer.h"
#include "action_util.h"
#include "timer.h"
#include "matrix.h"
#include "led.h"
#include "host.h"
#include "oled_driver.h"
#include "progmem.h"
#include <stdio.h>

void draw_default(void);
Expand Down
4 changes: 4 additions & 0 deletions keyboards/clueboard/2x1800/2021/max7219.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
*/

#include "max7219.h"
#include "spi_master.h"
#include "debug.h"
#include "gpio.h"
#include "wait.h"
#include "font.h"

// Datastructures
Expand Down
6 changes: 4 additions & 2 deletions keyboards/clueboard/2x1800/2021/max7219.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#pragma once
#include "quantum.h"
#include "spi_master.h"

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

// Set defaults if they're not set
#ifndef MAX7219_LOAD
Expand Down
4 changes: 0 additions & 4 deletions keyboards/converter/usb_usb/custom_matrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "host.h"
#include "keyboard.h"

extern "C" {
#include "quantum.h"
}

/* KEY CODE to Matrix
*
* HID keycode(1 byte):
Expand Down
3 changes: 2 additions & 1 deletion keyboards/converter/xt_usb/xt.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ POSSIBILITY OF SUCH DAMAGE.

#pragma once

#include "quantum.h"
#include <stdint.h>
#include "gpio.h"

#define XT_DATA_IN() \
do { \
Expand Down
3 changes: 1 addition & 2 deletions keyboards/duck/duck_led/duck_led.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include <avr/io.h>
#include "duck_led.h"
#include "quantum.h"
#include "wait.h"

void show(void) {
wait_us((RES / 1000UL) + 1);
Expand Down
5 changes: 1 addition & 4 deletions keyboards/duck/jetfire/indicator_leds.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@ 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 "indicator_leds.h"
#include <avr/interrupt.h>
#include <avr/io.h>
#include <stdbool.h>
#include <util/delay.h>
#include <stdint.h>
#include "indicator_leds.h"
#include "quantum.h"

#define LED_T1H 900
#define LED_T1L 600
Expand Down
2 changes: 2 additions & 0 deletions keyboards/duck/jetfire/indicator_leds.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include <stdint.h>
#include <stdbool.h>
#include "duck_led/duck_led.h"

void backlight_init_ports(void);
Expand Down
3 changes: 1 addition & 2 deletions keyboards/fallacy/indicators.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
*/
#pragma once

#include "quantum.h"

#include <stdbool.h>

void init_fallacy_leds(void);
void update_fallacy_leds(void);
Expand Down
3 changes: 3 additions & 0 deletions keyboards/handwired/d48/taphold.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#include "taphold.h"
#include "action_layer.h"
#include "keyboard.h"
#include "timer.h"

bool taphold_process(uint16_t keycode, keyrecord_t *record) {
for (int i = 0; i < taphold_config_size; i++) {
Expand Down
4 changes: 3 additions & 1 deletion keyboards/handwired/d48/taphold.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#pragma once

#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "action.h"

typedef enum taphold_mode_t {
TAPHOLD_LAYER,
Expand Down
6 changes: 3 additions & 3 deletions keyboards/handwired/dygma/raise/leds.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "quantum.h"
#include "leds.h"
#include <string.h>
#include "i2c_master.h"
#include "led_tables.h"
#include "rgb_matrix.h"
#include <string.h>
#include "wait.h"
#include "raise.h"
#include "wire-protocol-constants.h"
#include "print.h"
#include "leds.h"

// Color order of LEDs is Green, Red, Blue.
typedef struct PACKED {
Expand Down
3 changes: 1 addition & 2 deletions keyboards/handwired/dygma/raise/leds.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

#pragma once

#include "quantum.h"
#include "rgb_matrix.h"
#include <stdint.h>

extern const uint8_t led_map[RGB_MATRIX_LED_COUNT];

Expand Down
4 changes: 1 addition & 3 deletions keyboards/handwired/lagrange/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#include <spi_master.h>

#include "quantum.h"
#include "spi_master.h"
#include "split_util.h"
#include "transport.h"
#include "timer.h"
Expand Down
1 change: 0 additions & 1 deletion keyboards/handwired/promethium/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif
#include "eeconfig.h"
#include "process_unicode.h"
#include "quantum.h"
#ifdef RGBSPS_ENABLE
#include "rgbsps.h"
#include "rgbtheme.h"
Expand Down
1 change: 1 addition & 0 deletions keyboards/hotdox/left.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "action.h"
#include "left.h"
#include "print.h"
#include "wait.h"

bool i2c_initialized = false;
Expand Down
4 changes: 0 additions & 4 deletions keyboards/hotdox/left.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#pragma once

#include "quantum.h"
#include <stdint.h>
#include "i2c_master.h"
#include <util/delay.h>

#define MCP23017
#define MCP23017_A0 0
Expand Down Expand Up @@ -43,8 +41,6 @@ void left_scan(void);
uint8_t left_read_cols(void);
uint8_t left_get_col(uint8_t col);

matrix_row_t left_read_row(void);

void left_unselect_rows(void);
void left_select_row(uint8_t row);

Expand Down
3 changes: 3 additions & 0 deletions keyboards/idobao/id61/keymaps/idobao/specialk.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// SPDX-License-Identifier: GPL-2.0-or-later

#include "specialk.h"
#include "keycodes.h"
#include "action_layer.h"
#include "action_util.h"

bool delkey_registered = false;
uint32_t __keycode_raised = 0;
Expand Down
3 changes: 1 addition & 2 deletions keyboards/idobao/id61/keymaps/idobao/specialk.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

#include <stdint.h>
#include <stdbool.h>
#include "util.h"
#include "quantum.h"
#include "action.h"

bool ID61_process_special_k(uint16_t keycode, keyrecord_t *record, bool arrow_mode, uint8_t k_norm, uint8_t k_spcl, uint8_t k_altr);
bool ID61_backspace_special(uint16_t keycode, keyrecord_t *record);
5 changes: 3 additions & 2 deletions keyboards/input_club/k_type/i2c_master.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@

#ifdef RGB_MATRIX_ENABLE


#include "quantum.h"
#include "i2c_master.h"
#include "gpio.h"
#include "chibios_config.h"
#include <string.h>
#include <ch.h>
#include <hal.h>

static uint8_t i2c_address;
Expand Down
1 change: 0 additions & 1 deletion keyboards/kagizaraya/chidori/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "print.h"
#include "debug.h"
#include "matrix.h"
#include "quantum.h"
#include "board.h"
#include "i2c_master.h"

Expand Down
3 changes: 2 additions & 1 deletion keyboards/keyboardio/model01/leds.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
* 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 "leds.h"
#include "i2c_master.h"
#include "led_tables.h"
#include "rgb_matrix.h"
Expand Down
3 changes: 1 addition & 2 deletions keyboards/keyboardio/model01/leds.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
*/
#pragma once

#include "quantum.h"
#include "rgb_matrix.h"
#include <stdint.h>

void set_all_leds_to(uint8_t r, uint8_t g, uint8_t b);
void set_led_to(int led, uint8_t r, uint8_t g, uint8_t b);
4 changes: 4 additions & 0 deletions keyboards/matrix/m20add/rgb_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@

#include "rgb_ring.h"

#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "quantum.h"
#include "rgblight.h"
#include "timer.h"
#include "action.h"
#include "drivers/led/issi/is31fl3731.h"
#include "i2c_master.h"

Expand Down
2 changes: 1 addition & 1 deletion keyboards/miiiw/common/shift_register.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "quantum.h"
#include "shift_register.h"
#include <string.h>

static void shift_out(void);

Expand Down
1 change: 1 addition & 0 deletions keyboards/miiiw/common/shift_register.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#pragma once

#include <stdint.h>
#include "gpio.h"

#ifndef GPIOH_BASE
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion keyboards/molecule/adns.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "spi_master.h"
#include "adns.h"
#include "debug.h"
#include "quantum.h"
#include "wait.h"
#include "pointing_device.h"
#include "adns9800_srom_A6.h"

Expand Down
2 changes: 2 additions & 0 deletions keyboards/molecule/adns.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/
#pragma once

#include <stdint.h>

void adns_begin(void);

void adns_end(void);
Expand Down
3 changes: 2 additions & 1 deletion keyboards/nullbitsco/common/bitc_led.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
*/
#pragma once

#include "quantum.h"
#include <stdint.h>
#include "gpio.h"

#define LED_ON 2
#define LED_DIM 1
Expand Down
3 changes: 3 additions & 0 deletions keyboards/nullbitsco/common/remote_kb.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ This will require a new communication protocol, as the current one is limited.
*/

#include "remote_kb.h"
#include "quantum.h"
#include "uart.h"
#include "wait.h"
#include "debug.h"

uint8_t
msg[UART_MSG_LEN],
Expand Down
Loading
Loading