From 5f4412a1a4277d39137edad7bc1593aa05933c27 Mon Sep 17 00:00:00 2001 From: Mark Sikora Date: Sat, 14 Apr 2018 17:24:16 -0400 Subject: [PATCH] Inline functions need to be declared as static --- keyboard/ergodox/ergodox.h | 44 +++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/keyboard/ergodox/ergodox.h b/keyboard/ergodox/ergodox.h index c3729d04..67d43c3d 100644 --- a/keyboard/ergodox/ergodox.h +++ b/keyboard/ergodox/ergodox.h @@ -66,23 +66,23 @@ extern bool ergodox_left_led_1; // left top extern bool ergodox_left_led_2; // left middle extern bool ergodox_left_led_3; // left bottom -inline void ergodox_board_led_on(void) { DDRD |= (1<<6); PORTD |= (1<<6); } -inline void ergodox_right_led_1_on(void) { DDRB |= (1<<5); PORTB |= (1<<5); } -inline void ergodox_right_led_2_on(void) { DDRB |= (1<<6); PORTB |= (1<<6); } -inline void ergodox_right_led_3_on(void) { DDRB |= (1<<7); PORTB |= (1<<7); } -inline void ergodox_left_led_1_on(void) { ergodox_left_led_1 = 1; } -inline void ergodox_left_led_2_on(void) { ergodox_left_led_2 = 1; } -inline void ergodox_left_led_3_on(void) { ergodox_left_led_3 = 1; } - -inline void ergodox_board_led_off(void) { DDRD &= ~(1<<6); PORTD &= ~(1<<6); } -inline void ergodox_right_led_1_off(void) { DDRB &= ~(1<<5); PORTB &= ~(1<<5); } -inline void ergodox_right_led_2_off(void) { DDRB &= ~(1<<6); PORTB &= ~(1<<6); } -inline void ergodox_right_led_3_off(void) { DDRB &= ~(1<<7); PORTB &= ~(1<<7); } -inline void ergodox_left_led_1_off(void) { ergodox_left_led_1 = 0; } -inline void ergodox_left_led_2_off(void) { ergodox_left_led_2 = 0; } -inline void ergodox_left_led_3_off(void) { ergodox_left_led_3 = 0; } - -inline void ergodox_led_all_on(void) +static inline void ergodox_board_led_on(void) { DDRD |= (1<<6); PORTD |= (1<<6); } +static inline void ergodox_right_led_1_on(void) { DDRB |= (1<<5); PORTB |= (1<<5); } +static inline void ergodox_right_led_2_on(void) { DDRB |= (1<<6); PORTB |= (1<<6); } +static inline void ergodox_right_led_3_on(void) { DDRB |= (1<<7); PORTB |= (1<<7); } +static inline void ergodox_left_led_1_on(void) { ergodox_left_led_1 = 1; } +static inline void ergodox_left_led_2_on(void) { ergodox_left_led_2 = 1; } +static inline void ergodox_left_led_3_on(void) { ergodox_left_led_3 = 1; } + +static inline void ergodox_board_led_off(void) { DDRD &= ~(1<<6); PORTD &= ~(1<<6); } +static inline void ergodox_right_led_1_off(void) { DDRB &= ~(1<<5); PORTB &= ~(1<<5); } +static inline void ergodox_right_led_2_off(void) { DDRB &= ~(1<<6); PORTB &= ~(1<<6); } +static inline void ergodox_right_led_3_off(void) { DDRB &= ~(1<<7); PORTB &= ~(1<<7); } +static inline void ergodox_left_led_1_off(void) { ergodox_left_led_1 = 0; } +static inline void ergodox_left_led_2_off(void) { ergodox_left_led_2 = 0; } +static inline void ergodox_left_led_3_off(void) { ergodox_left_led_3 = 0; } + +static inline void ergodox_led_all_on(void) { ergodox_board_led_on(); ergodox_right_led_1_on(); @@ -94,7 +94,7 @@ inline void ergodox_led_all_on(void) ergodox_left_leds_update(); } -inline void ergodox_led_all_off(void) +static inline void ergodox_led_all_off(void) { ergodox_board_led_off(); ergodox_right_led_1_off(); @@ -106,11 +106,11 @@ inline void ergodox_led_all_off(void) ergodox_left_leds_update(); } -inline void ergodox_right_led_1_set(uint8_t n) { OCR1A = n; } -inline void ergodox_right_led_2_set(uint8_t n) { OCR1B = n; } -inline void ergodox_right_led_3_set(uint8_t n) { OCR1C = n; } +static inline void ergodox_right_led_1_set(uint8_t n) { OCR1A = n; } +static inline void ergodox_right_led_2_set(uint8_t n) { OCR1B = n; } +static inline void ergodox_right_led_3_set(uint8_t n) { OCR1C = n; } -inline void ergodox_led_all_set(uint8_t n) +static inline void ergodox_led_all_set(uint8_t n) { ergodox_right_led_1_set(n); ergodox_right_led_2_set(n); -- 2.46.2