Change include guards in tmk_core/ and drivers/ to pragma once (#11240)

master
Ryan 2020-12-26 15:56:11 +11:00 committed by GitHub
parent 48f4768d33
commit 1d1d5da43f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
60 changed files with 96 additions and 258 deletions

View File

@ -1,5 +1,3 @@
#ifndef LCD_H
#define LCD_H
/************************************************************************* /*************************************************************************
Title : C include file for the HD44780U LCD library (lcd.c) Title : C include file for the HD44780U LCD library (lcd.c)
Author: Peter Fleury <pfleury@gmx.ch> http://tinyurl.com/peterfleury Author: Peter Fleury <pfleury@gmx.ch> http://tinyurl.com/peterfleury
@ -43,6 +41,8 @@
*/ */
#pragma once
#include <inttypes.h> #include <inttypes.h>
#include <avr/pgmspace.h> #include <avr/pgmspace.h>
@ -346,5 +346,3 @@ extern void lcd_data(uint8_t data);
#define lcd_puts_P(__s) lcd_puts_p(PSTR(__s)) #define lcd_puts_P(__s) lcd_puts_p(PSTR(__s))
/**@}*/ /**@}*/
#endif // LCD_H

View File

@ -17,8 +17,7 @@
* GitHub repository: https://github.com/g4lvanix/I2C-master-lib * GitHub repository: https://github.com/g4lvanix/I2C-master-lib
*/ */
#ifndef I2C_MASTER_H #pragma once
#define I2C_MASTER_H
#define I2C_READ 0x01 #define I2C_READ 0x01
#define I2C_WRITE 0x00 #define I2C_WRITE 0x00
@ -42,5 +41,3 @@ i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16
i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout); i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout);
i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout); i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
void i2c_stop(void); void i2c_stop(void);
#endif // I2C_MASTER_H

View File

@ -20,8 +20,7 @@
Read or write to the necessary buffer according to the opperation. Read or write to the necessary buffer according to the opperation.
*/ */
#ifndef I2C_SLAVE_H #pragma once
#define I2C_SLAVE_H
#define I2C_SLAVE_REG_COUNT 30 #define I2C_SLAVE_REG_COUNT 30
@ -29,5 +28,3 @@ extern volatile uint8_t i2c_slave_reg[I2C_SLAVE_REG_COUNT];
void i2c_slave_init(uint8_t address); void i2c_slave_init(uint8_t address);
void i2c_slave_stop(void); void i2c_slave_stop(void);
#endif // I2C_SLAVE_H

View File

@ -1,5 +1,4 @@
#ifndef SSD1306_H #pragma once
#define SSD1306_H
#include <stdbool.h> #include <stdbool.h>
#include <stdio.h> #include <stdio.h>
@ -86,5 +85,3 @@ void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c);
void matrix_write(struct CharacterMatrix *matrix, const char *data); void matrix_write(struct CharacterMatrix *matrix, const char *data);
void matrix_write_P(struct CharacterMatrix *matrix, const char *data); void matrix_write_P(struct CharacterMatrix *matrix, const char *data);
void matrix_render(struct CharacterMatrix *matrix); void matrix_render(struct CharacterMatrix *matrix);
#endif

View File

@ -14,8 +14,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef ACTION_H
#define ACTION_H #pragma once
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
@ -124,5 +124,3 @@ void debug_action(action_t action);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* ACTION_H */

View File

@ -14,8 +14,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef ACTION_CODE_H
#define ACTION_CODE_H #pragma once
/** \brief Action codes /** \brief Action codes
* *
@ -306,5 +306,3 @@ enum swap_hands_param_tap_op {
#define ACTION_SWAP_HANDS_OFF_ON() ACTION(ACT_SWAP_HANDS, OP_SH_OFF_ON) #define ACTION_SWAP_HANDS_OFF_ON() ACTION(ACT_SWAP_HANDS, OP_SH_OFF_ON)
#define ACTION_SWAP_HANDS_ON() ACTION(ACT_SWAP_HANDS, OP_SH_ON) #define ACTION_SWAP_HANDS_ON() ACTION(ACT_SWAP_HANDS, OP_SH_ON)
#define ACTION_SWAP_HANDS_OFF() ACTION(ACT_SWAP_HANDS, OP_SH_OFF) #define ACTION_SWAP_HANDS_OFF() ACTION(ACT_SWAP_HANDS, OP_SH_OFF)
#endif /* ACTION_CODE_H */

View File

@ -14,8 +14,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef ACTION_LAYER_H
#define ACTION_LAYER_H #pragma once
#include <stdint.h> #include <stdint.h>
#include "keyboard.h" #include "keyboard.h"
@ -120,5 +120,3 @@ uint8_t layer_switch_get_layer(keypos_t key);
/* return action depending on current layer status */ /* return action depending on current layer status */
action_t layer_switch_get_action(keypos_t key); action_t layer_switch_get_action(keypos_t key);
#endif

View File

@ -14,8 +14,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef ACTION_MACRO_H
#define ACTION_MACRO_H #pragma once
#include <stdint.h> #include <stdint.h>
#include "progmem.h" #include "progmem.h"
@ -120,5 +121,3 @@ enum macro_command_id {
/* for backward comaptibility */ /* for backward comaptibility */
#define MD(key) DOWN(KC_##key) #define MD(key) DOWN(KC_##key)
#define MU(key) UP(KC_##key) #define MU(key) UP(KC_##key)
#endif /* ACTION_MACRO_H */

View File

@ -14,8 +14,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef ACTION_TAPPING_H
#define ACTION_TAPPING_H #pragma once
/* period of tapping(ms) */ /* period of tapping(ms) */
#ifndef TAPPING_TERM #ifndef TAPPING_TERM
@ -36,5 +36,3 @@ uint16_t get_event_keycode(keyevent_t event, bool update_layer_cache);
uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record); uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record);
void action_tapping_process(keyrecord_t record); void action_tapping_process(keyrecord_t record);
#endif #endif
#endif

View File

@ -14,8 +14,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef ACTION_UTIL_H
#define ACTION_UTIL_H #pragma once
#include <stdint.h> #include <stdint.h>
#include "report.h" #include "report.h"
@ -98,5 +98,3 @@ void clear_oneshot_swaphands(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif

View File

@ -1,10 +1,7 @@
#ifndef _PRINTF_H_ #pragma once
#define _PRINTF_H_
#define CONSOLE_PRINTBUF_SIZE 512 #define CONSOLE_PRINTBUF_SIZE 512
void console_printf(char *fmt, ...); void console_printf(char *fmt, ...);
#define __xprintf console_printf #define __xprintf console_printf
#endif //_PRINTF_H_

View File

@ -1,5 +1,4 @@
#ifndef SUSPEND_AVR_H #pragma once
#define SUSPEND_AVR_H
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
@ -24,5 +23,3 @@ __asm__ __volatile__ ( \
: "r0" \ : "r0" \
) )
// clang-format on // clang-format on
#endif

View File

@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef TIMER_AVR_H #pragma once
#define TIMER_AVR_H 1
#include <stdint.h> #include <stdint.h>
@ -38,5 +37,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#if (TIMER_RAW_TOP > 255) #if (TIMER_RAW_TOP > 255)
# error "Timer0 can't count 1ms at this clock freq. Use larger prescaler." # error "Timer0 can't count 1ms at this clock freq. Use larger prescaler."
#endif #endif
#endif

View File

@ -2,8 +2,7 @@
Extended itoa, puts and printf (C)ChaN, 2011 Extended itoa, puts and printf (C)ChaN, 2011
-----------------------------------------------------------------------------*/ -----------------------------------------------------------------------------*/
#ifndef XPRINTF_H #pragma once
#define XPRINTF_H
#include <inttypes.h> #include <inttypes.h>
#include <avr/pgmspace.h> #include <avr/pgmspace.h>
@ -102,5 +101,3 @@ char xatoi(char **str, long *ret);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif

View File

@ -15,10 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef BOOTLOADER_H #pragma once
#define BOOTLOADER_H
/* give code for your bootloader to come up if needed */ /* give code for your bootloader to come up if needed */
void bootloader_jump(void); void bootloader_jump(void);
#endif

View File

@ -1,5 +1,4 @@
#ifndef BOOTMAGIC_H #pragma once
#define BOOTMAGIC_H
/* FIXME: Add special doxygen comments for defines here. */ /* FIXME: Add special doxygen comments for defines here. */
@ -101,5 +100,3 @@
void bootmagic(void); void bootmagic(void);
bool bootmagic_scan_keycode(uint8_t keycode); bool bootmagic_scan_keycode(uint8_t keycode);
#endif

View File

@ -21,8 +21,7 @@
* This library also assumes that the pages are not used by the firmware. * This library also assumes that the pages are not used by the firmware.
*/ */
#ifndef __EEPROM_H #pragma once
#define __EEPROM_H
#include <ch.h> #include <ch.h>
#include <hal.h> #include <hal.h>
@ -83,5 +82,3 @@ uint16_t EEPROM_Init(void);
void EEPROM_Erase(void); void EEPROM_Erase(void);
uint16_t EEPROM_WriteDataByte(uint16_t Address, uint8_t DataByte); uint16_t EEPROM_WriteDataByte(uint16_t Address, uint8_t DataByte);
uint8_t EEPROM_ReadDataByte(uint16_t Address); uint8_t EEPROM_ReadDataByte(uint16_t Address);
#endif /* __EEPROM_H */

View File

@ -16,8 +16,7 @@
* Modifications for QMK and STM32F303 by Yiancar * Modifications for QMK and STM32F303 by Yiancar
*/ */
#ifndef __FLASH_STM32_H #pragma once
#define __FLASH_STM32_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -41,5 +40,3 @@ void FLASH_ClearFlag(uint32_t FLASH_FLAG);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* __FLASH_STM32_H */

View File

@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef DEBUG_H #pragma once
#define DEBUG_H 1
#include <stdbool.h> #include <stdbool.h>
#include "print.h" #include "print.h"
@ -168,5 +167,3 @@ extern debug_config_t debug_config;
# define debug_bin_reverse(data) # define debug_bin_reverse(data)
#endif /* NO_DEBUG */ #endif /* NO_DEBUG */
#endif

View File

@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef EECONFIG_H #pragma once
#define EECONFIG_H
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
@ -111,5 +110,3 @@ void eeconfig_update_haptic(uint32_t val);
bool eeconfig_read_handedness(void); bool eeconfig_read_handedness(void);
void eeconfig_update_handedness(bool val); void eeconfig_update_handedness(bool val);
#endif

View File

@ -1,5 +1,4 @@
#ifndef TMK_CORE_COMMON_EEPROM_H_ #pragma once
#define TMK_CORE_COMMON_EEPROM_H_
#if defined(__AVR__) && !defined(EEPROM_DRIVER) #if defined(__AVR__) && !defined(EEPROM_DRIVER)
# include <avr/eeprom.h> # include <avr/eeprom.h>
@ -20,5 +19,3 @@ void eeprom_update_word(uint16_t *__p, uint16_t __value);
void eeprom_update_dword(uint32_t *__p, uint32_t __value); void eeprom_update_dword(uint32_t *__p, uint32_t __value);
void eeprom_update_block(const void *__src, void *__dst, size_t __n); void eeprom_update_block(const void *__src, void *__dst, size_t __n);
#endif #endif
#endif /* TMK_CORE_COMMON_EEPROM_H_ */

View File

@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef HOST_DRIVER_H #pragma once
#define HOST_DRIVER_H
#include <stdint.h> #include <stdint.h>
#include "report.h" #include "report.h"
@ -31,5 +30,3 @@ typedef struct {
void (*send_system)(uint16_t); void (*send_system)(uint16_t);
void (*send_consumer)(uint16_t); void (*send_consumer)(uint16_t);
} host_driver_t; } host_driver_t;
#endif

View File

@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef KEYBOARD_H #pragma once
#define KEYBOARD_H
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
@ -77,5 +76,3 @@ void housekeeping_task_user(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif

View File

@ -21,8 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* See https://web.archive.org/web/20060218214400/http://www.usb.org/developers/devclass_docs/Hut1_12.pdf * See https://web.archive.org/web/20060218214400/http://www.usb.org/developers/devclass_docs/Hut1_12.pdf
* or http://www.usb.org/developers/hidpage/Hut1_12v2.pdf (older) * or http://www.usb.org/developers/hidpage/Hut1_12v2.pdf (older)
*/ */
#ifndef KEYCODE_H
#define KEYCODE_H #pragma once
/* FIXME: Add doxygen comments here */ /* FIXME: Add doxygen comments here */
@ -542,4 +542,3 @@ enum mouse_keys {
KC_MS_ACCEL1, KC_MS_ACCEL1,
KC_MS_ACCEL2 KC_MS_ACCEL2
}; };
#endif

View File

@ -1,6 +1,3 @@
#ifndef MAGIC_H #pragma once
#define MAGIC_H
void magic(void); void magic(void);
#endif

View File

@ -14,8 +14,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef MATRIX_H
#define MATRIX_H #pragma once
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
@ -76,5 +76,3 @@ void matrix_scan_user(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif

View File

@ -15,9 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef MOUSEKEY_H #pragma once
# define MOUSEKEY_H
#endif
#include <stdbool.h> #include <stdbool.h>
#include "host.h" #include "host.h"

View File

@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef NODEBUG_H #pragma once
#define NODEBUG_H
#ifndef NO_DEBUG #ifndef NO_DEBUG
# define NO_DEBUG # define NO_DEBUG
@ -25,5 +24,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#else #else
# include "debug.h" # include "debug.h"
#endif #endif
#endif

View File

@ -22,8 +22,7 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
#ifndef PRINT_H__ #pragma once
#define PRINT_H__ 1
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
@ -269,5 +268,3 @@ extern "C"
#define pbin16(data) print_bin16(data) #define pbin16(data) print_bin16(data)
#define pbin_reverse(data) print_bin_reverse8(data) #define pbin_reverse(data) print_bin_reverse8(data)
#define pbin_reverse16(data) print_bin_reverse16(data) #define pbin_reverse16(data) print_bin_reverse16(data)
#endif

View File

@ -1,8 +1,5 @@
#ifndef _RAW_HID_H_ #pragma once
#define _RAW_HID_H_
void raw_hid_receive(uint8_t *data, uint8_t length); void raw_hid_receive(uint8_t *data, uint8_t length);
void raw_hid_send(uint8_t *data, uint8_t length); void raw_hid_send(uint8_t *data, uint8_t length);
#endif

View File

@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef SENDCHAR_H #pragma once
#define SENDCHAR_H
#include <stdint.h> #include <stdint.h>
@ -30,5 +29,3 @@ int8_t sendchar(uint8_t c);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif

View File

@ -1,5 +1,4 @@
#ifndef SLEEP_LED_H #pragma once
#define SLEEP_LED_H
#ifdef SLEEP_LED_ENABLE #ifdef SLEEP_LED_ENABLE
@ -16,5 +15,3 @@ void sleep_led_toggle(void);
# define sleep_led_toggle() # define sleep_led_toggle()
#endif #endif
#endif

View File

@ -1,5 +1,4 @@
#ifndef SUSPEND_H #pragma once
#define SUSPEND_H
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
@ -13,5 +12,3 @@ void suspend_wakeup_init_user(void);
void suspend_wakeup_init_kb(void); void suspend_wakeup_init_kb(void);
void suspend_power_down_user(void); void suspend_power_down_user(void);
void suspend_power_down_kb(void); void suspend_power_down_kb(void);
#endif

View File

@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef TIMER_H #pragma once
#define TIMER_H 1
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
@ -51,5 +50,3 @@ uint32_t timer_elapsed32(uint32_t last);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif

View File

@ -1,5 +1,4 @@
#ifndef _uart_included_h_ #pragma once
#define _uart_included_h_
#include <stdint.h> #include <stdint.h>
@ -7,5 +6,3 @@ void uart_init(uint32_t baud);
void uart_putchar(uint8_t c); void uart_putchar(uint8_t c);
uint8_t uart_getchar(void); uint8_t uart_getchar(void);
uint8_t uart_available(void); uint8_t uart_available(void);
#endif

View File

@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef UTIL_H #pragma once
#define UTIL_H
#include <stdint.h> #include <stdint.h>
@ -46,5 +45,3 @@ uint32_t bitrev32(uint32_t bits);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif

View File

@ -1,10 +1,7 @@
#ifndef _VIRTSER_H_ #pragma once
#define _VIRTSER_H_
/* Define this function in your code to process incoming bytes */ /* Define this function in your code to process incoming bytes */
void virtser_recv(const uint8_t ch); void virtser_recv(const uint8_t ch);
/* Call this to send a character over the Virtual Serial Device */ /* Call this to send a character over the Virtual Serial Device */
void virtser_send(const uint8_t byte); void virtser_send(const uint8_t byte);
#endif

View File

@ -1,5 +1,4 @@
#ifndef WAIT_H #pragma once
#define WAIT_H
#include <inttypes.h> #include <inttypes.h>
@ -41,5 +40,3 @@ void wait_ms(uint32_t ms);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif

View File

@ -35,8 +35,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef ADB_H #pragma once
#define ADB_H
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
@ -57,5 +56,3 @@ void adb_host_listen(uint8_t cmd, uint8_t data_h, uint8_t data_l);
void adb_host_kbd_led(uint8_t led); void adb_host_kbd_led(uint8_t led);
void adb_mouse_task(void); void adb_mouse_task(void);
void adb_mouse_init(void); void adb_mouse_init(void);
#endif

View File

@ -22,10 +22,9 @@
* @{ * @{
*/ */
#ifndef USB_DRIVER_H #pragma once
# define USB_DRIVER_H
# include <hal_usb_cdc.h> #include <hal_usb_cdc.h>
/*===========================================================================*/ /*===========================================================================*/
/* Driver constants. */ /* Driver constants. */
@ -35,9 +34,9 @@
/* Derived constants and error checks. */ /* Derived constants and error checks. */
/*===========================================================================*/ /*===========================================================================*/
# if HAL_USE_USB == FALSE #if HAL_USE_USB == FALSE
# error "The USB Driver requires HAL_USE_USB" # error "The USB Driver requires HAL_USE_USB"
# endif #endif
/*===========================================================================*/ /*===========================================================================*/
/* Driver data structures and types. */ /* Driver data structures and types. */
@ -112,21 +111,21 @@ typedef struct {
/** /**
* @brief @p SerialDriver specific data. * @brief @p SerialDriver specific data.
*/ */
# define _qmk_usb_driver_data \ #define _qmk_usb_driver_data \
_base_asynchronous_channel_data /* Driver state.*/ \ _base_asynchronous_channel_data /* Driver state.*/ \
qmkusbstate_t state; \ qmkusbstate_t state; \
/* Input buffers queue.*/ \ /* Input buffers queue.*/ \
input_buffers_queue_t ibqueue; \ input_buffers_queue_t ibqueue; \
/* Output queue.*/ \ /* Output queue.*/ \
output_buffers_queue_t obqueue; \ output_buffers_queue_t obqueue; \
/* End of the mandatory fields.*/ \ /* End of the mandatory fields.*/ \
/* Current configuration data.*/ \ /* Current configuration data.*/ \
const QMKUSBConfig *config; const QMKUSBConfig *config;
/** /**
* @brief @p SerialUSBDriver specific methods. * @brief @p SerialUSBDriver specific methods.
*/ */
# define _qmk_usb_driver_methods _base_asynchronous_channel_methods #define _qmk_usb_driver_methods _base_asynchronous_channel_methods
/** /**
* @extends BaseAsynchronousChannelVMT * @extends BaseAsynchronousChannelVMT
@ -158,9 +157,9 @@ struct QMKUSBDriver {
/* External declarations. */ /* External declarations. */
/*===========================================================================*/ /*===========================================================================*/
# ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
# endif #endif
void qmkusbInit(void); void qmkusbInit(void);
void qmkusbObjectInit(QMKUSBDriver *qmkusbp, const QMKUSBConfig *config); void qmkusbObjectInit(QMKUSBDriver *qmkusbp, const QMKUSBConfig *config);
void qmkusbStart(QMKUSBDriver *qmkusbp, const QMKUSBConfig *config); void qmkusbStart(QMKUSBDriver *qmkusbp, const QMKUSBConfig *config);
@ -173,10 +172,8 @@ void qmkusbSOFHookI(QMKUSBDriver *qmkusbp);
void qmkusbDataTransmitted(USBDriver *usbp, usbep_t ep); void qmkusbDataTransmitted(USBDriver *usbp, usbep_t ep);
void qmkusbDataReceived(USBDriver *usbp, usbep_t ep); void qmkusbDataReceived(USBDriver *usbp, usbep_t ep);
void qmkusbInterruptTransmitted(USBDriver *usbp, usbep_t ep); void qmkusbInterruptTransmitted(USBDriver *usbp, usbep_t ep);
# ifdef __cplusplus #ifdef __cplusplus
} }
# endif #endif
#endif /* USB_DRIVER_H */
/** @} */ /** @} */

View File

@ -15,8 +15,7 @@
* GPL v2 or later. * GPL v2 or later.
*/ */
#ifndef _USB_MAIN_H_ #pragma once
#define _USB_MAIN_H_
// TESTING // TESTING
// extern uint8_t blinkLed; // extern uint8_t blinkLed;
@ -89,5 +88,3 @@ int8_t sendchar(uint8_t c);
void console_flush_output(void); void console_flush_output(void);
#endif /* CONSOLE_ENABLE */ #endif /* CONSOLE_ENABLE */
#endif /* _USB_MAIN_H_ */

View File

@ -1,8 +1,8 @@
/* /*
Copyright 2014 Jun WAKO <wakojun@gmail.com> Copyright 2014 Jun WAKO <wakojun@gmail.com>
*/ */
#ifndef IBM4704_H
#define IBM4704_H #pragma once
#define IBM4704_ERR_NONE 0 #define IBM4704_ERR_NONE 0
#define IBM4704_ERR_PARITY 0x70 #define IBM4704_ERR_PARITY 0x70
@ -101,5 +101,3 @@ static inline void inhibit(void) {
clock_hi(); clock_hi();
data_lo(); data_lo();
} }
#endif

View File

@ -36,8 +36,7 @@
this software. this software.
*/ */
#ifndef _LUFA_H_ #pragma once
#define _LUFA_H_
#include <avr/io.h> #include <avr/io.h>
#include <avr/wdt.h> #include <avr/wdt.h>
@ -68,5 +67,3 @@ extern host_driver_t lufa_driver;
// The header and terminator are not stored to save a few bytes of precious ram // The header and terminator are not stored to save a few bytes of precious ram
# define MIDI_SYSEX_BUFFER (API_SYSEX_MAX_SIZE + API_SYSEX_MAX_SIZE / 7 + (API_SYSEX_MAX_SIZE % 7 ? 1 : 0)) # define MIDI_SYSEX_BUFFER (API_SYSEX_MAX_SIZE + API_SYSEX_MAX_SIZE / 7 + (API_SYSEX_MAX_SIZE % 7 ? 1 : 0))
#endif #endif
#endif

View File

@ -35,8 +35,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef M0110_H #pragma once
#define M0110_H
/* port settings for clock and data line */ /* port settings for clock and data line */
#if !(defined(M0110_CLOCK_PORT) && defined(M0110_CLOCK_PIN) && defined(M0110_CLOCK_DDR) && defined(M0110_CLOCK_BIT)) #if !(defined(M0110_CLOCK_PORT) && defined(M0110_CLOCK_PIN) && defined(M0110_CLOCK_DDR) && defined(M0110_CLOCK_BIT))
@ -80,5 +79,3 @@ uint8_t m0110_recv(void);
uint8_t m0110_recv_key(void); uint8_t m0110_recv_key(void);
uint8_t m0110_inquiry(void); uint8_t m0110_inquiry(void);
uint8_t m0110_instant(void); uint8_t m0110_instant(void);
#endif

View File

@ -39,8 +39,7 @@
* manual section "Summary of Compile Tokens". * manual section "Summary of Compile Tokens".
*/ */
#ifndef _LUFA_CONFIG_H_ #pragma once
#define _LUFA_CONFIG_H_
#if (ARCH == ARCH_AVR8) #if (ARCH == ARCH_AVR8)
@ -90,4 +89,3 @@
# error Unsupported architecture for this LUFA configuration file. # error Unsupported architecture for this LUFA configuration file.
#endif #endif
#endif

View File

@ -17,8 +17,7 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with avr-bytequeue. If not, see <http://www.gnu.org/licenses/>. // along with avr-bytequeue. If not, see <http://www.gnu.org/licenses/>.
#ifndef BYTEQUEUE_H #pragma once
#define BYTEQUEUE_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -54,5 +53,3 @@ void bytequeue_remove(byteQueue_t* queue, byteQueueIndex_t numToRemove);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif

View File

@ -16,8 +16,7 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with avr-bytequeue. If not, see <http://www.gnu.org/licenses/>. // along with avr-bytequeue. If not, see <http://www.gnu.org/licenses/>.
#ifndef INTERRUPT_SETTING_H #pragma once
#define INTERRUPT_SETTING_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -34,5 +33,3 @@ void restore_interrupt_setting(interrupt_setting_t setting);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif

View File

@ -25,8 +25,7 @@
* *
*/ */
#ifndef XNOR_MIDI_H #pragma once
#define XNOR_MIDI_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -486,5 +485,3 @@ midi_packet_length_t midi_packet_length(uint8_t status);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif

View File

@ -21,8 +21,7 @@
* @brief Device implementation functions * @brief Device implementation functions
*/ */
#ifndef MIDI_DEVICE_H #pragma once
#define MIDI_DEVICE_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -147,5 +146,3 @@ void midi_device_set_pre_input_process_func(MidiDevice* device, midi_no_byte_fun
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif

View File

@ -21,8 +21,7 @@
* @brief Function signature definitions * @brief Function signature definitions
*/ */
#ifndef MIDI_FUNCTION_TYPES_H #pragma once
#define MIDI_FUNCTION_TYPES_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -46,5 +45,3 @@ typedef void (*midi_sysex_func_t)(MidiDevice *device, uint16_t start_byte, uint8
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif

View File

@ -16,8 +16,7 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with avr-midi. If not, see <http://www.gnu.org/licenses/>. // along with avr-midi. If not, see <http://www.gnu.org/licenses/>.
#ifndef SYSEX_TOOLS_H #pragma once
#define SYSEX_TOOLS_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -91,5 +90,3 @@ uint16_t sysex_decode(uint8_t *decoded, const uint8_t *source, uint16_t length);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif

View File

@ -35,8 +35,8 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef NEWS_H #pragma once
#define NEWS_H
/* /*
* Primitive PS/2 Library for AVR * Primitive PS/2 Library for AVR
*/ */
@ -46,5 +46,3 @@ void news_init(void);
uint8_t news_recv(void); uint8_t news_recv(void);
/* device role */ /* device role */
#endif

View File

@ -45,13 +45,12 @@ POSSIBILITY OF SUCH DAMAGE.
*/ */
#pragma once
#include <stdbool.h> #include <stdbool.h>
#ifndef NEXT_KBD_H #define NEXT_KBD_KMBUS_IDLE 0x300600
# define NEXT_KBD_H #define NEXT_KBD_TIMING 50
# define NEXT_KBD_KMBUS_IDLE 0x300600
# define NEXT_KBD_TIMING 50
extern uint8_t next_kbd_error; extern uint8_t next_kbd_error;
@ -59,5 +58,3 @@ extern uint8_t next_kbd_error;
void next_kbd_init(void); void next_kbd_init(void);
void next_kbd_set_leds(bool left, bool right); void next_kbd_set_leds(bool left, bool right);
uint32_t next_kbd_recv(void); uint32_t next_kbd_recv(void);
#endif

View File

@ -35,8 +35,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef PS2_H #pragma once
#define PS2_H
#include <stdbool.h> #include <stdbool.h>
#include "wait.h" #include "wait.h"
@ -138,5 +137,3 @@ static inline void inhibit(void) {
clock_lo(); clock_lo();
data_hi(); data_hi();
} }
#endif

View File

@ -1,5 +1,4 @@
#ifndef PS2_IO_H #pragma once
#define PS2_IO_H
void clock_init(void); void clock_init(void);
void clock_lo(void); void clock_lo(void);
@ -10,5 +9,3 @@ void data_init(void);
void data_lo(void); void data_lo(void);
void data_hi(void); void data_hi(void);
bool data_in(void); bool data_in(void);
#endif

View File

@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef PS2_MOUSE_H #pragma once
#define PS2_MOUSE_H
#include <stdbool.h> #include <stdbool.h>
#include "debug.h" #include "debug.h"
@ -176,5 +175,3 @@ void ps2_mouse_set_resolution(ps2_mouse_resolution_t resolution);
void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate); void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate);
void ps2_mouse_moved_user(report_mouse_t *mouse_report); void ps2_mouse_moved_user(report_mouse_t *mouse_report);
#endif

View File

@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef SERIAL_MOUSE_H #pragma once
#define SERIAL_MOUSE_H
#include <stdint.h> #include <stdint.h>
@ -28,5 +27,3 @@ static inline uint8_t serial_mouse_init(void) {
} }
void serial_mouse_task(void); void serial_mouse_task(void);
#endif

View File

@ -40,8 +40,8 @@
* *
* Header file for Descriptors.c. * Header file for Descriptors.c.
*/ */
#ifndef _DESCRIPTORS_H_
#define _DESCRIPTORS_H_ #pragma once
#include <LUFA/Drivers/USB/USB.h> #include <LUFA/Drivers/USB/USB.h>
@ -286,4 +286,3 @@ enum usb_endpoints {
#define JOYSTICK_EPSIZE 8 #define JOYSTICK_EPSIZE 8
uint16_t get_usb_descriptor(const uint16_t wValue, const uint16_t wIndex, const void** const DescriptorAddress); uint16_t get_usb_descriptor(const uint16_t wValue, const uint16_t wIndex, const void** const DescriptorAddress);
#endif

View File

@ -36,8 +36,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef XT_H #pragma once
#define XT_H
#define XT_DATA_IN() \ #define XT_DATA_IN() \
do { \ do { \
@ -69,5 +68,3 @@ POSSIBILITY OF SUCH DAMAGE.
void xt_host_init(void); void xt_host_init(void);
uint8_t xt_host_recv(void); uint8_t xt_host_recv(void);
#endif

View File

@ -1,5 +1,5 @@
#ifndef RING_BUFFER_H #pragma once
#define RING_BUFFER_H
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
* Ring buffer to store scan codes from keyboard * Ring buffer to store scan codes from keyboard
*------------------------------------------------------------------*/ *------------------------------------------------------------------*/
@ -43,5 +43,3 @@ static inline bool rbuf_has_data(void) {
static inline void rbuf_clear(void) { static inline void rbuf_clear(void) {
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { rbuf_head = rbuf_tail = 0; } ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { rbuf_head = rbuf_tail = 0; }
} }
#endif /* RING_BUFFER_H */