mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-12 10:51:33 +00:00
Compilation fixes for -fno-common
(#25436)
This commit is contained in:
parent
d9f2d8d241
commit
7827f9fbe3
@ -70,7 +70,7 @@ typedef struct {
|
|||||||
int8_t dy;
|
int8_t dy;
|
||||||
} report_adns5050_t;
|
} report_adns5050_t;
|
||||||
|
|
||||||
const pointing_device_driver_t adns5050_pointing_device_driver;
|
extern const pointing_device_driver_t adns5050_pointing_device_driver;
|
||||||
|
|
||||||
// A bunch of functions to implement the ADNS5050-specific serial protocol.
|
// A bunch of functions to implement the ADNS5050-specific serial protocol.
|
||||||
// Note that the "serial.h" driver is insufficient, because it does not
|
// Note that the "serial.h" driver is insufficient, because it does not
|
||||||
|
@ -61,7 +61,7 @@ typedef struct {
|
|||||||
int16_t y;
|
int16_t y;
|
||||||
} report_adns9800_t;
|
} report_adns9800_t;
|
||||||
|
|
||||||
const pointing_device_driver_t adns9800_pointing_device_driver;
|
extern const pointing_device_driver_t adns9800_pointing_device_driver;
|
||||||
|
|
||||||
bool adns9800_init(void);
|
bool adns9800_init(void);
|
||||||
config_adns9800_t adns9800_get_config(void);
|
config_adns9800_t adns9800_get_config(void);
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
# define ANALOG_JOYSTICK_SPEED_MAX 2
|
# define ANALOG_JOYSTICK_SPEED_MAX 2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const pointing_device_driver_t analog_joystick_pointing_device_driver;
|
extern const pointing_device_driver_t analog_joystick_pointing_device_driver;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int8_t x;
|
int8_t x;
|
||||||
|
@ -178,7 +178,7 @@ typedef struct {
|
|||||||
# define POINTING_DEVICE_TASK_THROTTLE_MS AZOTEQ_IQS5XX_REPORT_RATE + 1
|
# define POINTING_DEVICE_TASK_THROTTLE_MS AZOTEQ_IQS5XX_REPORT_RATE + 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const pointing_device_driver_t azoteq_iqs5xx_pointing_device_driver;
|
extern const pointing_device_driver_t azoteq_iqs5xx_pointing_device_driver;
|
||||||
|
|
||||||
bool azoteq_iqs5xx_init(void);
|
bool azoteq_iqs5xx_init(void);
|
||||||
i2c_status_t azoteq_iqs5xx_wake(void);
|
i2c_status_t azoteq_iqs5xx_wake(void);
|
||||||
|
@ -112,7 +112,7 @@ typedef struct {
|
|||||||
|
|
||||||
#define cirque_pinnacle_i2c_pointing_device_driver cirque_pinnacle_pointing_device_driver
|
#define cirque_pinnacle_i2c_pointing_device_driver cirque_pinnacle_pointing_device_driver
|
||||||
#define cirque_pinnacle_spi_pointing_device_driver cirque_pinnacle_pointing_device_driver
|
#define cirque_pinnacle_spi_pointing_device_driver cirque_pinnacle_pointing_device_driver
|
||||||
const pointing_device_driver_t cirque_pinnacle_pointing_device_driver;
|
extern const pointing_device_driver_t cirque_pinnacle_pointing_device_driver;
|
||||||
|
|
||||||
bool cirque_pinnacle_init(void);
|
bool cirque_pinnacle_init(void);
|
||||||
void cirque_pinnacle_calibrate(void);
|
void cirque_pinnacle_calibrate(void);
|
||||||
|
@ -41,7 +41,7 @@ typedef struct {
|
|||||||
bool isMotion;
|
bool isMotion;
|
||||||
} report_paw3204_t;
|
} report_paw3204_t;
|
||||||
|
|
||||||
const pointing_device_driver_t paw3204_pointing_device_driver;
|
extern const pointing_device_driver_t paw3204_pointing_device_driver;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Initializes the sensor so it is in a working state and ready to
|
* @brief Initializes the sensor so it is in a working state and ready to
|
||||||
|
@ -50,7 +50,7 @@ typedef struct {
|
|||||||
uint8_t click;
|
uint8_t click;
|
||||||
} pimoroni_data_t;
|
} pimoroni_data_t;
|
||||||
|
|
||||||
const pointing_device_driver_t pimoroni_trackball_pointing_device_driver;
|
extern const pointing_device_driver_t pimoroni_trackball_pointing_device_driver;
|
||||||
|
|
||||||
bool pimoroni_trackball_device_init(void);
|
bool pimoroni_trackball_device_init(void);
|
||||||
void pimoroni_trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white);
|
void pimoroni_trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white);
|
||||||
|
@ -55,7 +55,7 @@ typedef struct {
|
|||||||
int8_t dy;
|
int8_t dy;
|
||||||
} report_pmw3320_t;
|
} report_pmw3320_t;
|
||||||
|
|
||||||
const pointing_device_driver_t pmw3320_pointing_device_driver;
|
extern const pointing_device_driver_t pmw3320_pointing_device_driver;
|
||||||
|
|
||||||
// A bunch of functions to implement the PMW3320-specific serial protocol.
|
// A bunch of functions to implement the PMW3320-specific serial protocol.
|
||||||
// Mostly taken from ADNS5050 driver.
|
// Mostly taken from ADNS5050 driver.
|
||||||
|
@ -106,7 +106,7 @@ STATIC_ASSERT(sizeof((pmw33xx_report_t){0}.motion) == 1, "pmw33xx_report_t.motio
|
|||||||
|
|
||||||
#define pmw3360_pointing_device_driver pmw33xx_pointing_device_driver;
|
#define pmw3360_pointing_device_driver pmw33xx_pointing_device_driver;
|
||||||
#define pmw3389_pointing_device_driver pmw33xx_pointing_device_driver;
|
#define pmw3389_pointing_device_driver pmw33xx_pointing_device_driver;
|
||||||
const pointing_device_driver_t pmw33xx_pointing_device_driver;
|
extern const pointing_device_driver_t pmw33xx_pointing_device_driver;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Initializes the given sensor so it is in a working state and ready to
|
* @brief Initializes the given sensor so it is in a working state and ready to
|
||||||
|
@ -21,6 +21,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#include "bajjak.h"
|
#include "bajjak.h"
|
||||||
|
|
||||||
|
bool bajjak_left_led_1 = 0;
|
||||||
|
bool bajjak_left_led_2 = 0;
|
||||||
|
bool bajjak_left_led_3 = 0;
|
||||||
|
|
||||||
extern inline void bajjak_board_led_on(void);
|
extern inline void bajjak_board_led_on(void);
|
||||||
extern inline void bajjak_right_led_1_on(void);
|
extern inline void bajjak_right_led_1_on(void);
|
||||||
extern inline void bajjak_right_led_2_on(void);
|
extern inline void bajjak_right_led_2_on(void);
|
||||||
|
@ -66,9 +66,9 @@ inline void bajjak_right_led_3_off(void) { gpio_set_pin_input(B7); gpio_write_
|
|||||||
inline void bajjak_right_led_off(uint8_t led) { gpio_set_pin_input(led+4); gpio_write_pin_low(led+4); }
|
inline void bajjak_right_led_off(uint8_t led) { gpio_set_pin_input(led+4); gpio_write_pin_low(led+4); }
|
||||||
|
|
||||||
#ifdef LEFT_LEDS
|
#ifdef LEFT_LEDS
|
||||||
bool bajjak_left_led_1;
|
extern bool bajjak_left_led_1;
|
||||||
bool bajjak_left_led_2;
|
extern bool bajjak_left_led_2;
|
||||||
bool bajjak_left_led_3;
|
extern bool bajjak_left_led_3;
|
||||||
|
|
||||||
inline void bajjak_left_led_1_on(void) { bajjak_left_led_1 = 1; }
|
inline void bajjak_left_led_1_on(void) { bajjak_left_led_1 = 1; }
|
||||||
inline void bajjak_left_led_2_on(void) { bajjak_left_led_2 = 1; }
|
inline void bajjak_left_led_2_on(void) { bajjak_left_led_2 = 1; }
|
||||||
|
@ -132,7 +132,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
|||||||
|
|
||||||
// Variables for display layer and haptic status on OLED
|
// Variables for display layer and haptic status on OLED
|
||||||
static uint8_t layer = 0;
|
static uint8_t layer = 0;
|
||||||
haptic_config_t haptic_config;
|
extern haptic_config_t haptic_config;
|
||||||
|
|
||||||
// Variables for frames, timer, and sleep
|
// Variables for frames, timer, and sleep
|
||||||
uint32_t anim_timer = 0;
|
uint32_t anim_timer = 0;
|
||||||
|
@ -40,7 +40,7 @@ extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values
|
|||||||
extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values
|
extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values
|
||||||
|
|
||||||
// row offsets for each hand
|
// row offsets for each hand
|
||||||
uint8_t thisHand, thatHand;
|
static uint8_t thisHand, thatHand;
|
||||||
|
|
||||||
// user-defined overridable functions
|
// user-defined overridable functions
|
||||||
__attribute__((weak)) void matrix_slave_scan_user(void) {}
|
__attribute__((weak)) void matrix_slave_scan_user(void) {}
|
||||||
|
@ -124,7 +124,7 @@ void system76_ec_rgb_layer(layer_state_t layer_state);
|
|||||||
void system76_ec_unlock(void);
|
void system76_ec_unlock(void);
|
||||||
bool system76_ec_is_unlocked(void);
|
bool system76_ec_is_unlocked(void);
|
||||||
|
|
||||||
rgb_config_t layer_rgb[DYNAMIC_KEYMAP_LAYER_COUNT];
|
extern rgb_config_t layer_rgb[DYNAMIC_KEYMAP_LAYER_COUNT];
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
usb_mux_init();
|
usb_mux_init();
|
||||||
|
@ -69,7 +69,7 @@ static bool active_keys(effect_params_t* params) {
|
|||||||
return led_max < RGB_MATRIX_LED_COUNT;
|
return led_max < RGB_MATRIX_LED_COUNT;
|
||||||
}
|
}
|
||||||
|
|
||||||
rgb_t raw_rgb_data[RGB_MATRIX_LED_COUNT] = {0};
|
extern rgb_t raw_rgb_data[RGB_MATRIX_LED_COUNT];
|
||||||
|
|
||||||
static uint8_t normalize_component(uint8_t component) {
|
static uint8_t normalize_component(uint8_t component) {
|
||||||
uint16_t x = (uint16_t)component;
|
uint16_t x = (uint16_t)component;
|
||||||
|
@ -135,7 +135,7 @@ static enum rgb_matrix_effects mode_map[] = {
|
|||||||
|
|
||||||
_Static_assert(sizeof(mode_map) == MODE_LAST, "mode_map_length");
|
_Static_assert(sizeof(mode_map) == MODE_LAST, "mode_map_length");
|
||||||
|
|
||||||
rgb_t raw_rgb_data[RGB_MATRIX_LED_COUNT];
|
rgb_t raw_rgb_data[RGB_MATRIX_LED_COUNT] = {0};
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
rgb_config_t layer_rgb[DYNAMIC_KEYMAP_LAYER_COUNT] = {
|
rgb_config_t layer_rgb[DYNAMIC_KEYMAP_LAYER_COUNT] = {
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#define ws2812_set_color ws2812_rgb_set_color
|
#define ws2812_set_color ws2812_rgb_set_color
|
||||||
#define ws2812_set_color_all ws2812_rgb_set_color_all
|
#define ws2812_set_color_all ws2812_rgb_set_color_all
|
||||||
#define ws2812_flush ws2812_rgb_flush
|
#define ws2812_flush ws2812_rgb_flush
|
||||||
|
#define ws2812_leds ws2812_rgb_leds
|
||||||
|
|
||||||
#include "ws2812_bitbang.c"
|
#include "ws2812_bitbang.c"
|
||||||
|
|
||||||
|
@ -371,8 +371,9 @@ void audio_play_melody(float (*np)[][2], uint16_t n_count, bool n_repeat) {
|
|||||||
melody_current_note_duration = audio_duration_to_ms((*notes_pointer)[current_note][1]);
|
melody_current_note_duration = audio_duration_to_ms((*notes_pointer)[current_note][1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
float click[2][2];
|
void audio_play_click(uint16_t delay, float pitch, uint16_t duration) {
|
||||||
void audio_play_click(uint16_t delay, float pitch, uint16_t duration) {
|
static float click[2][2];
|
||||||
|
|
||||||
uint16_t duration_tone = audio_ms_to_duration(duration);
|
uint16_t duration_tone = audio_ms_to_duration(duration);
|
||||||
uint16_t duration_delay = audio_ms_to_duration(delay);
|
uint16_t duration_delay = audio_ms_to_duration(delay);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user