diff --git a/Bootloader/_buildvars.h b/Bootloader/_buildvars.h index 4097a7a..1d9267a 100644 --- a/Bootloader/_buildvars.h +++ b/Bootloader/_buildvars.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2014 by Jacob Alexander +/* Copyright (C) 2013-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __buildvars_h -#define __buildvars_h +#pragma once // ----- Includes ----- @@ -42,5 +41,3 @@ #define VENDOR_ID @BOOT_VENDOR_ID@ #define PRODUCT_ID @BOOT_PRODUCT_ID@ -#endif - diff --git a/Bootloader/debug.h b/Bootloader/debug.h index d73395a..83e9bac 100644 --- a/Bootloader/debug.h +++ b/Bootloader/debug.h @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef debug_h__ -#define debug_h__ +#pragma once // ----- Includes ----- @@ -64,5 +63,3 @@ void printHex_op( uint32_t in, uint8_t op ); #define printHex_op(in,op) #endif -#endif - diff --git a/Bootloader/dfu.desc.h b/Bootloader/dfu.desc.h index d5ebb1a..3ef80f4 100644 --- a/Bootloader/dfu.desc.h +++ b/Bootloader/dfu.desc.h @@ -1,5 +1,5 @@ // Originally Generated from MCHCK Toolkit -/* Copyright (c) Jacob Alexander 2014 +/* Copyright (c) Jacob Alexander 2014-2015 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef __DFU_DESC_H -#define __DFU_DESC_H +#pragma once // ----- Local Includes ----- @@ -39,5 +38,3 @@ struct usb_config_1 { struct dfu_function_desc usb_function_0; }; -#endif - diff --git a/Bootloader/dfu.h b/Bootloader/dfu.h index 1462746..d4da289 100644 --- a/Bootloader/dfu.h +++ b/Bootloader/dfu.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef _USB_DFU_H -#define _USB_DFU_H +#pragma once // ----- Compiler Includes ----- @@ -171,4 +170,3 @@ void dfu_write_done( enum dfu_status, struct dfu_ctx *ctx ); void dfu_init( dfu_setup_read_t setup_read, dfu_setup_write_t setup_write, dfu_finish_write_t finish_write, struct dfu_ctx *ctx ); void dfu_app_init( dfu_detach_t detachcb ); -#endif diff --git a/Bootloader/flash.h b/Bootloader/flash.h index 83a592a..f35ac30 100644 --- a/Bootloader/flash.h +++ b/Bootloader/flash.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef __FLASH_H -#define __FLASH_H +#pragma once // ----- Defines ----- @@ -34,10 +33,7 @@ __attribute__((section(".ramtext.ftfl_submit_cmd"), long_call)) int ftfl_submit_cmd(void); int flash_prepare_flashing(void); int flash_erase_sector(uintptr_t); -//int flash_program_section(uintptr_t, size_t); int flash_program_sector(uintptr_t, size_t); int flash_program_longword(uintptr_t, uint8_t*); void *flash_get_staging_area(uintptr_t, size_t); -#endif - diff --git a/Bootloader/ftfl.h b/Bootloader/ftfl.h index 033162c..9543d92 100644 --- a/Bootloader/ftfl.h +++ b/Bootloader/ftfl.h @@ -1,5 +1,5 @@ /* Copyright (c) 2011,2012 Simon Schubert <2@0x2c.org>. - * Modifications by Jacob Alexander 2014 + * Modifications by Jacob Alexander 2014-2015 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef __FTFL_H -#define __FTFL_H +#pragma once // ----- Local Includes ----- @@ -242,5 +241,3 @@ extern volatile struct FTFL_t FTFL; extern char FlexRAM[]; extern struct FTFL_CONFIG_t FTFL_CONFIG; -#endif - diff --git a/Bootloader/mchck-cdefs.h b/Bootloader/mchck-cdefs.h index 8bc2b20..4f2eba1 100644 --- a/Bootloader/mchck-cdefs.h +++ b/Bootloader/mchck-cdefs.h @@ -1,5 +1,5 @@ /* Copyright (c) 2011,2012 Simon Schubert <2@0x2c.org>. - * Modifications by Jacob Alexander 2014 + * Modifications by Jacob Alexander 2014-2015 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef _MCHCK_CDEFS_H -#define _MCHCK_CDEFS_H +#pragma once // ----- Compiler Includes ----- @@ -134,5 +133,3 @@ typedef __CHAR16_TYPE__ char16_t; ) \ ) -#endif - diff --git a/Bootloader/mchck.h b/Bootloader/mchck.h index 13bc392..de155ba 100644 --- a/Bootloader/mchck.h +++ b/Bootloader/mchck.h @@ -1,5 +1,5 @@ /* Copyright (c) 2011,2012 Simon Schubert <2@0x2c.org>. - * Modifications by Jacob Alexander 2014=2015 + * Modifications by Jacob Alexander 2014-2015 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef __MCHCK_H -#define __MCHCK_H +#pragma once // ----- Compiler Includes ----- @@ -45,5 +44,3 @@ extern uint32_t _sidata, _sdata, _edata, _sbss, _ebss, _app_rom, _app_rom_end, _ #include "flash.h" #include "usb.h" -#endif - diff --git a/Bootloader/sim.h b/Bootloader/sim.h index dcb4f0c..d6dbb5f 100644 --- a/Bootloader/sim.h +++ b/Bootloader/sim.h @@ -1,5 +1,5 @@ /* Copyright (c) 2011,2012 Simon Schubert <2@0x2c.org>. - * Modifications by Jacob Alexander 2014 + * Modifications by Jacob Alexander 2014-2015 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef __SIM_H -#define __SIM_H +#pragma once // ----- Local Includes ----- @@ -328,5 +327,3 @@ CTASSERT_SIZE_BYTE(struct SIM_t, 0x1064); extern volatile struct SIM_t SIM; -#endif - diff --git a/Bootloader/usb-common.h b/Bootloader/usb-common.h index 0857017..cd58c78 100644 --- a/Bootloader/usb-common.h +++ b/Bootloader/usb-common.h @@ -1,5 +1,5 @@ /* Copyright (c) 2011,2012 Simon Schubert <2@0x2c.org>. - * Modifications by Jacob Alexander 2014 + * Modifications by Jacob Alexander 2014-2015 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef _USB_COMMON_H -#define _USB_COMMON_H +#pragma once // ----- Enumerations ----- @@ -56,5 +55,3 @@ enum { EP0_BUFSIZE = 64 }; -#endif - diff --git a/Bootloader/usb-internal.h b/Bootloader/usb-internal.h index 6d9210c..57e0e27 100644 --- a/Bootloader/usb-internal.h +++ b/Bootloader/usb-internal.h @@ -1,5 +1,5 @@ /* Copyright (c) 2011,2012 Simon Schubert <2@0x2c.org>. - * Modifications by Jacob Alexander 2014 + * Modifications by Jacob Alexander 2014-2015 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef __USB_INTERNAL_H -#define __USB_INTERNAL_H +#pragma once /** * Internal driver structures @@ -100,5 +99,3 @@ void usb_restart(void); void usb_enable(void); const struct usbd_config *usb_get_config_data(int config); -#endif - diff --git a/Bootloader/usb.h b/Bootloader/usb.h index d03e677..1a0dbf0 100644 --- a/Bootloader/usb.h +++ b/Bootloader/usb.h @@ -1,5 +1,5 @@ /* Copyright (c) 2011,2012 Simon Schubert <2@0x2c.org>. - * Modifications by Jacob Alexander 2014 + * Modifications by Jacob Alexander 2014-2015 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef __USB_H -#define __USB_H +#pragma once // ----- Compiler Includes ----- @@ -509,5 +508,3 @@ int usb_ep0_tx_cp(const void *, size_t, size_t, ep_callback_t, void *); #include "dfu.h" -#endif - diff --git a/Bootloader/usbotg.h b/Bootloader/usbotg.h index 5a617ce..5d3cb24 100644 --- a/Bootloader/usbotg.h +++ b/Bootloader/usbotg.h @@ -1,5 +1,5 @@ /* Copyright (c) 2011,2012 Simon Schubert <2@0x2c.org>. - * Modifications by Jacob Alexander 2014 + * Modifications by Jacob Alexander 2014-2015 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,6 +15,8 @@ * along with this program. If not, see . */ +#pragma once + // ----- Local Includes ----- #include "mchck.h" diff --git a/Debug/cli/cli.h b/Debug/cli/cli.h index 89cff99..97efd8a 100644 --- a/Debug/cli/cli.h +++ b/Debug/cli/cli.h @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef cli_h__ -#define cli_h__ +#pragma once // ----- Includes ----- @@ -130,6 +129,3 @@ void cliFunc_reset ( char* args ); void cliFunc_restart ( char* args ); void cliFunc_version ( char* args ); - -#endif - diff --git a/Debug/led/led.h b/Debug/led/led.h index 107fbc3..cd18ef8 100644 --- a/Debug/led/led.h +++ b/Debug/led/led.h @@ -1,15 +1,15 @@ -/* Copyright (C) 2011-2013 by Jacob Alexander - * +/* Copyright (C) 2011-2013,2015 by Jacob Alexander + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __led_h -#define __led_h +#pragma once // ----- Includes ----- @@ -31,5 +30,3 @@ void init_errorLED( void ); void errorLED( uint8_t on ); -#endif - diff --git a/Debug/print/print.h b/Debug/print/print.h index 9508819..adeb2c4 100644 --- a/Debug/print/print.h +++ b/Debug/print/print.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2014 by Jacob Alexander +/* Copyright (C) 2011-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef print_h__ -#define print_h__ +#pragma once // ----- Includes ----- @@ -116,5 +115,3 @@ uint16_t lenStr ( char* in ); int16_t eqStr ( char* str1, char* str2 ); // Returns -1 if identical, last character of str1 comparison (0 if str1 is like str2) int numToInt ( char* in ); // Returns the int representation of a string -#endif - diff --git a/Lib/Interrupts.h b/Lib/Interrupts.h index 0eb4a9c..a55dafc 100644 --- a/Lib/Interrupts.h +++ b/Lib/Interrupts.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2014 by Jacob Alexander +/* Copyright (C) 2013-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -25,8 +25,7 @@ // ----- Includes ----- -#ifndef __INTERRUPTS_H -#define __INTERRUPTS_H +#pragma once // ARM #if defined(_mk20dx128_) || defined(_mk20dx128vlf5_) || defined(_mk20dx256_) || defined(_mk20dx256vlh7_) @@ -58,6 +57,3 @@ #endif - -#endif - diff --git a/Lib/MacroLib.h b/Lib/MacroLib.h index ea4617f..541593c 100644 --- a/Lib/MacroLib.h +++ b/Lib/MacroLib.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2014 by Jacob Alexander +/* Copyright (C) 2013-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -23,9 +23,7 @@ // This include file decides which set of compiler family include files to use on typical Macro modules. // Additional includes should only be added to this file if they should be added to *all* Macro modules. - -#ifndef __MACROLIB_H -#define __MACROLIB_H +#pragma once // ----- Includes ----- @@ -50,6 +48,3 @@ #endif - -#endif - diff --git a/Lib/MainLib.h b/Lib/MainLib.h index 1206782..da75813 100644 --- a/Lib/MainLib.h +++ b/Lib/MainLib.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2014 by Jacob Alexander +/* Copyright (C) 2013-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -23,9 +23,7 @@ // This include file decides which set of compiler family include files to use on typical Scan modules. // Additional includes should only be added to this file if they should be added to *all* Scan modules. - -#ifndef __MAINLIB_H -#define __MAINLIB_H +#pragma once // ----- Includes ----- @@ -49,6 +47,3 @@ #endif - -#endif - diff --git a/Lib/OutputLib.h b/Lib/OutputLib.h index a8e3450..701308e 100644 --- a/Lib/OutputLib.h +++ b/Lib/OutputLib.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2014 by Jacob Alexander +/* Copyright (C) 2013-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -23,9 +23,7 @@ // This include file decides which set of compiler family include files to use on typical Scan modules. // Additional includes should only be added to this file if they should be added to *all* Scan modules. - -#ifndef __OUTPUTLIB_H -#define __OUTPUTLIB_H +#pragma once // ----- Includes ----- @@ -46,6 +44,3 @@ #endif - -#endif - diff --git a/Lib/ScanLib.h b/Lib/ScanLib.h index b875ffb..bbc4f4b 100644 --- a/Lib/ScanLib.h +++ b/Lib/ScanLib.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2014 by Jacob Alexander +/* Copyright (C) 2013-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -23,9 +23,7 @@ // This include file decides which set of compiler family include files to use on typical Scan modules. // Additional includes should only be added to this file if they should be added to *all* Scan modules. - -#ifndef __SCANLIB_H -#define __SCANLIB_H +#pragma once // ----- Includes ----- @@ -51,6 +49,3 @@ #endif - -#endif - diff --git a/Lib/_buildvars.h b/Lib/_buildvars.h index 717e325..5ff5d0f 100644 --- a/Lib/_buildvars.h +++ b/Lib/_buildvars.h @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __buildvars_h -#define __buildvars_h +#pragma once // ----- Includes ----- @@ -58,5 +57,3 @@ #define VENDOR_ID @VENDOR_ID@ #define PRODUCT_ID @PRODUCT_ID@ -#endif - diff --git a/Lib/delay.h b/Lib/delay.h index 992fcda..19f0425 100644 --- a/Lib/delay.h +++ b/Lib/delay.h @@ -1,7 +1,7 @@ /* Teensyduino Core Library * http://www.pjrc.com/teensy/ * Copyright (c) 2013 PJRC.COM, LLC. - * Modifications by Jacob Alexander 2013-2014 + * Modifications by Jacob Alexander 2013-2015 * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -29,8 +29,7 @@ * SOFTWARE. */ -#ifndef __DELAY_H -#define __DELAY_H +#pragma once // ----- System Includes ----- @@ -85,5 +84,3 @@ uint32_t micros(void); void delay(uint32_t ms); -#endif - diff --git a/Lib/mk20dx.h b/Lib/mk20dx.h index 0109f7f..aff530a 100644 --- a/Lib/mk20dx.h +++ b/Lib/mk20dx.h @@ -29,8 +29,7 @@ * SOFTWARE. */ -#ifndef _mk20dx_h_ -#define _mk20dx_h_ +#pragma once // ----- Defines ----- @@ -2090,5 +2089,3 @@ extern void portd_isr(void); extern void porte_isr(void); extern void software_isr(void); -#endif - diff --git a/Macro/PartialMap/kll.h b/Macro/PartialMap/kll.h index 492e1ba..e5e964f 100644 --- a/Macro/PartialMap/kll.h +++ b/Macro/PartialMap/kll.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 by Jacob Alexander +/* Copyright (C) 2014-2015 by Jacob Alexander * * This file is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -14,8 +14,7 @@ * along with this file. If not, see . */ -#ifndef __kll_h -#define __kll_h +#pragma once // ----- Includes ----- @@ -252,7 +251,3 @@ typedef struct Layer { // Total number of layers #define LayerNum sizeof( LayerIndex ) / sizeof( Layer ) - - -#endif // __kll_h - diff --git a/Macro/PartialMap/macro.h b/Macro/PartialMap/macro.h index 1d4717f..a165a45 100644 --- a/Macro/PartialMap/macro.h +++ b/Macro/PartialMap/macro.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 by Jacob Alexander +/* Copyright (C) 2014-2015 by Jacob Alexander * * This file is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -14,8 +14,7 @@ * along with this file. If not, see . */ -#ifndef __macro_h -#define __macro_h +#pragma once // ----- Includes ----- @@ -42,5 +41,3 @@ void Macro_triggerState( void *triggers, uint8_t num ); // triggers is of type T void Macro_process(); void Macro_setup(); -#endif - diff --git a/Macro/PartialMap/usb_hid.h b/Macro/PartialMap/usb_hid.h index f2dba32..a7d5581 100644 --- a/Macro/PartialMap/usb_hid.h +++ b/Macro/PartialMap/usb_hid.h @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __usb_hid_h -#define __usb_hid_h +#pragma once // ----- Defines ----- @@ -773,7 +772,3 @@ #define AC_DISTRIBUTE_VERTICALLY 0x29C // 0x29D-0xFFFF Reserved - - -#endif - diff --git a/Macro/basic/macro.h b/Macro/basic/macro.h index 12a490b..41358d6 100644 --- a/Macro/basic/macro.h +++ b/Macro/basic/macro.h @@ -1,15 +1,15 @@ -/* Copyright (C) 2011 by Jacob Alexander - * +/* Copyright (C) 2011,2015 by Jacob Alexander + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __macro_h -#define __macro_h +#pragma once // ----- Includes ----- @@ -34,5 +33,3 @@ void keyPressDetection( uint8_t *keys, uint8_t numberOfKeys, uint8_t *modifiers, uint8_t numberOfModifiers, uint8_t *map ); void process_macros(void); -#endif - diff --git a/Macro/buffer/macro.h b/Macro/buffer/macro.h index 12a490b..41358d6 100644 --- a/Macro/buffer/macro.h +++ b/Macro/buffer/macro.h @@ -1,15 +1,15 @@ -/* Copyright (C) 2011 by Jacob Alexander - * +/* Copyright (C) 2011,2015 by Jacob Alexander + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __macro_h -#define __macro_h +#pragma once // ----- Includes ----- @@ -34,5 +33,3 @@ void keyPressDetection( uint8_t *keys, uint8_t numberOfKeys, uint8_t *modifiers, uint8_t numberOfModifiers, uint8_t *map ); void process_macros(void); -#endif - diff --git a/Output/pjrcUSB/arm/usb_desc.h b/Output/pjrcUSB/arm/usb_desc.h index 6eae0b6..e3b6fb5 100644 --- a/Output/pjrcUSB/arm/usb_desc.h +++ b/Output/pjrcUSB/arm/usb_desc.h @@ -1,7 +1,7 @@ /* Teensyduino Core Library * http://www.pjrc.com/teensy/ * Copyright (c) 2013 PJRC.COM, LLC. - * Modified by Jacob Alexander (2013-2014) + * Modified by Jacob Alexander (2013-2015) * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -29,8 +29,7 @@ * SOFTWARE. */ -#ifndef _usb_desc_h_ -#define _usb_desc_h_ +#pragma once // ----- Includes ----- @@ -126,6 +125,3 @@ extern const uint8_t usb_endpoint_config_table[NUM_ENDPOINTS]; extern const usb_descriptor_list_t usb_descriptor_list[]; - -#endif - diff --git a/Output/pjrcUSB/arm/usb_dev.h b/Output/pjrcUSB/arm/usb_dev.h index 0090e89..e4f8add 100644 --- a/Output/pjrcUSB/arm/usb_dev.h +++ b/Output/pjrcUSB/arm/usb_dev.h @@ -1,7 +1,7 @@ /* Teensyduino Core Library * http://www.pjrc.com/teensy/ * Copyright (c) 2013 PJRC.COM, LLC. - * Modifications by Jacob Alexander 2014 + * Modifications by Jacob Alexander 2014-2015 * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -29,8 +29,7 @@ * SOFTWARE. */ -#ifndef _usb_dev_h_ -#define _usb_dev_h_ +#pragma once // ----- Includes ----- @@ -87,7 +86,3 @@ void usb_device_reload(); extern void usb_serial_flush_callback(); - - -#endif - diff --git a/Output/pjrcUSB/arm/usb_keyboard.h b/Output/pjrcUSB/arm/usb_keyboard.h index 8184879..f2bf804 100644 --- a/Output/pjrcUSB/arm/usb_keyboard.h +++ b/Output/pjrcUSB/arm/usb_keyboard.h @@ -1,7 +1,7 @@ /* Teensyduino Core Library * http://www.pjrc.com/teensy/ * Copyright (c) 2013 PJRC.COM, LLC. - * Modifications by Jacob Alexander 2013-2014 + * Modifications by Jacob Alexander 2013-2015 * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -29,8 +29,7 @@ * SOFTWARE. */ -#ifndef USBkeyboard_h_ -#define USBkeyboard_h_ +#pragma once // ----- Includes ----- @@ -46,7 +45,3 @@ void usb_keyboard_send(); - - -#endif // USBkeyboard_h_ - diff --git a/Output/pjrcUSB/arm/usb_mem.h b/Output/pjrcUSB/arm/usb_mem.h index 9beb63e..f4b43e5 100644 --- a/Output/pjrcUSB/arm/usb_mem.h +++ b/Output/pjrcUSB/arm/usb_mem.h @@ -1,7 +1,7 @@ /* Teensyduino Core Library * http://www.pjrc.com/teensy/ * Copyright (c) 2013 PJRC.COM, LLC. - * Modifications by Jacob Alexander (2013-2014) + * Modifications by Jacob Alexander (2013-2015) * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -29,8 +29,7 @@ * SOFTWARE. */ -#ifndef _usb_mem_h_ -#define _usb_mem_h_ +#pragma once // ----- Includes ----- @@ -55,7 +54,3 @@ typedef struct usb_packet_struct { usb_packet_t *usb_malloc(); void usb_free( usb_packet_t *p ); - - -#endif - diff --git a/Output/pjrcUSB/arm/usb_serial.h b/Output/pjrcUSB/arm/usb_serial.h index 487ef98..09980d3 100644 --- a/Output/pjrcUSB/arm/usb_serial.h +++ b/Output/pjrcUSB/arm/usb_serial.h @@ -1,7 +1,7 @@ /* Teensyduino Core Library * http://www.pjrc.com/teensy/ * Copyright (c) 2013 PJRC.COM, LLC. - * Modifications by Jacob Alexander (2013-2014) + * Modifications by Jacob Alexander (2013-2015) * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -29,8 +29,7 @@ * SOFTWARE. */ -#ifndef USBserial_h_ -#define USBserial_h_ +#pragma once // ----- Includes ----- @@ -73,7 +72,3 @@ int usb_serial_write( const void *buffer, uint32_t size ); void usb_serial_flush_input(); void usb_serial_flush_output(); - - -#endif // USBserial_h_ - diff --git a/Output/pjrcUSB/avr/usb_keyboard_serial.h b/Output/pjrcUSB/avr/usb_keyboard_serial.h index 9fb47ff..5ef90fa 100644 --- a/Output/pjrcUSB/avr/usb_keyboard_serial.h +++ b/Output/pjrcUSB/avr/usb_keyboard_serial.h @@ -1,6 +1,6 @@ /* USB Keyboard and CDC Serial Device for Teensy USB Development Board * Copyright (c) 2009 PJRC.COM, LLC - * Modifications by Jacob Alexander (2011-2014) + * Modifications by Jacob Alexander (2011-2015) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -21,8 +21,7 @@ * THE SOFTWARE. */ -#ifndef usb_keyboard_serial_h__ -#define usb_keyboard_serial_h__ +#pragma once // ----- Includes ----- @@ -701,7 +700,3 @@ static const struct descriptor_list_struct { }; #define NUM_DESC_LIST (sizeof(descriptor_list)/sizeof(struct descriptor_list_struct)) - - -#endif // usb_keyboard_serial_h__ - diff --git a/Output/pjrcUSB/output_com.h b/Output/pjrcUSB/output_com.h index ab1e05f..f2f2f58 100644 --- a/Output/pjrcUSB/output_com.h +++ b/Output/pjrcUSB/output_com.h @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __output_com_h -#define __output_com_h +#pragma once // ----- Includes ----- @@ -116,5 +115,3 @@ int Output_getchar(); int Output_putchar( char c ); int Output_putstr( char* str ); -#endif - diff --git a/Output/uartOut/arm/uart_serial.h b/Output/uartOut/arm/uart_serial.h index 1a0a2b6..4d13adf 100644 --- a/Output/uartOut/arm/uart_serial.h +++ b/Output/uartOut/arm/uart_serial.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 by Jacob Alexander +/* Copyright (C) 2014-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __uart_serial_h_ -#define __uart_serial_h_ +#pragma once #include @@ -36,5 +35,3 @@ void uart_serial_setup(); void uart_device_reload(); -#endif // __uart_serial_h_ - diff --git a/Output/uartOut/output_com.h b/Output/uartOut/output_com.h deleted file mode 100644 index 684d58a..0000000 --- a/Output/uartOut/output_com.h +++ /dev/null @@ -1,105 +0,0 @@ -/* Copyright (C) 2013-2015 by Jacob Alexander - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef __output_com_h -#define __output_com_h - -// ----- Includes ----- - -// Compiler Includes -#include - -// Local Includes -#include // Defines USB Parameters, partially generated by CMake - - - -// ----- Defines ----- - -// Max size of key buffer needed for NKRO -// Boot mode uses only the first 6 bytes -#define USB_NKRO_BITFIELD_SIZE_KEYS 26 -#define USB_BOOT_MAX_KEYS 6 - - - -// ----- Enumerations ----- - -// USB NKRO state transitions (indicates which Report ID's need refreshing) -// Boot mode just checks if any keys were changed (as everything is sent every time) -typedef enum USBKeyChangeState { - USBKeyChangeState_None = 0x00, - USBKeyChangeState_Modifiers = 0x01, - USBKeyChangeState_MainKeys = 0x02, - USBKeyChangeState_SecondaryKeys = 0x04, - USBKeyChangeState_System = 0x08, - USBKeyChangeState_Consumer = 0x10, -} USBKeyChangeState; - - - -// ----- Variables ----- - -// Variables used to communciate to the output module -// XXX Even if the output module is not USB, this is internally understood keymapping scheme -extern uint8_t USBKeys_Modifiers; -extern uint8_t USBKeys_Keys[USB_NKRO_BITFIELD_SIZE_KEYS]; -extern uint8_t USBKeys_Sent; -extern volatile uint8_t USBKeys_LEDs; - -extern uint8_t USBKeys_SysCtrl; // 1KRO container for System Control HID table -extern uint16_t USBKeys_ConsCtrl; // 1KRO container for Consumer Control HID table - -extern volatile uint8_t USBKeys_Protocol; // 0 - Boot Mode, 1 - NKRO Mode - -// Misc variables (XXX Some are only properly utilized using AVR) -extern uint8_t USBKeys_Idle_Config; -extern uint8_t USBKeys_Idle_Count; - -extern USBKeyChangeState USBKeys_Changed; - -extern uint8_t Output_Available; // 0 - Output module not fully functional, 1 - Output module working - - - -// ----- Capabilities ----- - -void Output_usbCodeSend_capability( uint8_t state, uint8_t stateType, uint8_t *args ); - - - -// ----- Functions ----- - -void Output_setup(); -void Output_send(); - -void Output_firmwareReload(); -void Output_softReset(); - -// Relies on USB serial module -unsigned int Output_availablechar(); - -int Output_getchar(); -int Output_putchar( char c ); -int Output_putstr( char* str ); - -#endif - diff --git a/Output/uartOut/setup.cmake b/Output/uartOut/setup.cmake index 17cc278..d411b87 100644 --- a/Output/uartOut/setup.cmake +++ b/Output/uartOut/setup.cmake @@ -30,6 +30,16 @@ elseif ( ${COMPILER_FAMILY} MATCHES "arm" ) endif () +### +# Includes +# + +# Use pjrcUSB output_com.h +include_directories ( + ${CMAKE_CURRENT_LIST_DIR}/../pjrcUSB +) + + ### # Compiler Family Compatibility # diff --git a/Output/usbMuxUart/output_com.h b/Output/usbMuxUart/output_com.h deleted file mode 100644 index d6b5836..0000000 --- a/Output/usbMuxUart/output_com.h +++ /dev/null @@ -1,119 +0,0 @@ -/* Copyright (C) 2013-2015 by Jacob Alexander - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef __output_com_h -#define __output_com_h - -// ----- Includes ----- - -// Compiler Includes -#include - -// Local Includes -#include // Defines USB Parameters, partially generated by CMake - - - -// ----- Defines ----- - -// Max size of key buffer needed for NKRO -// Boot mode uses only the first 6 bytes -#define USB_NKRO_BITFIELD_SIZE_KEYS 27 -#define USB_BOOT_MAX_KEYS 6 - - - -// ----- Enumerations ----- - -// USB NKRO state transitions (indicates which Report ID's need refreshing) -// Boot mode just checks if any keys were changed (as everything is sent every time) -typedef enum USBKeyChangeState { - USBKeyChangeState_None = 0x00, - USBKeyChangeState_Modifiers = 0x01, - USBKeyChangeState_MainKeys = 0x02, - USBKeyChangeState_SecondaryKeys = 0x04, - USBKeyChangeState_TertiaryKeys = 0x08, - USBKeyChangeState_QuartiaryKeys = 0x10, - USBKeyChangeState_System = 0x20, - USBKeyChangeState_Consumer = 0x40, - USBKeyChangeState_All = 0x7F, -} USBKeyChangeState; - - - -// ----- Variables ----- - -// Variables used to communciate to the output module -// XXX Even if the output module is not USB, this is internally understood keymapping scheme -extern uint8_t USBKeys_Modifiers; -extern uint8_t USBKeys_Keys[USB_NKRO_BITFIELD_SIZE_KEYS]; -extern uint8_t USBKeys_Sent; -extern volatile uint8_t USBKeys_LEDs; - -extern uint8_t USBKeys_SysCtrl; // 1KRO container for System Control HID table -extern uint16_t USBKeys_ConsCtrl; // 1KRO container for Consumer Control HID table - -extern volatile uint8_t USBKeys_Protocol; // 0 - Boot Mode, 1 - NKRO Mode - -// Misc variables (XXX Some are only properly utilized using AVR) -extern uint8_t USBKeys_Idle_Config; -extern uint8_t USBKeys_Idle_Count; - -extern USBKeyChangeState USBKeys_Changed; - -extern uint8_t Output_Available; // 0 - Output module not fully functional, 1 - Output module working - -extern uint8_t Output_DebugMode; // 0 - Debug disabled, 1 - Debug enabled - - - -// ----- Capabilities ----- - -void Output_consCtrlSend_capability( uint8_t state, uint8_t stateType, uint8_t *args ); -void Output_noneSend_capability( uint8_t state, uint8_t stateType, uint8_t *args ); -void Output_sysCtrlSend_capability( uint8_t state, uint8_t stateType, uint8_t *args ); -void Output_usbCodeSend_capability( uint8_t state, uint8_t stateType, uint8_t *args ); - -// Configuration capabilities -void Output_kbdProtocolBoot_capability( uint8_t state, uint8_t stateType, uint8_t *args ); -void Output_kbdProtocolNKRO_capability( uint8_t state, uint8_t stateType, uint8_t *args ); - - - -// ----- Functions ----- - -void Output_setup(); -void Output_send(); - -void Output_flushBuffers(); - -void Output_firmwareReload(); -void Output_softReset(); - -// Relies on USB serial module -unsigned int Output_availablechar(); - -int Output_getchar(); -int Output_putchar( char c ); -int Output_putstr( char* str ); - -#endif - diff --git a/Scan/ADCTest/defaultMap.h b/Scan/ADCTest/defaultMap.h index 7ace907..8ca8d9c 100644 --- a/Scan/ADCTest/defaultMap.h +++ b/Scan/ADCTest/defaultMap.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 by Jacob Alexander +/* Copyright (C) 2014-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __KEYMAP_H -#define __KEYMAP_H +#pragma once // ----- Variables ----- @@ -34,6 +33,3 @@ static uint8_t DefaultMap_Lookup[] = { 0, // 0x04 }; - -#endif - diff --git a/Scan/ADCTest/scan_loop.h b/Scan/ADCTest/scan_loop.h index 3566105..3e35b5b 100644 --- a/Scan/ADCTest/scan_loop.h +++ b/Scan/ADCTest/scan_loop.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 by Jacob Alexander +/* Copyright (C) 2014-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __SCAN_LOOP_H -#define __SCAN_LOOP_H +#pragma once // ----- Includes ----- @@ -61,5 +60,3 @@ void Scan_finishedWithUSBBuffer( uint8_t sentKeys ); void Scan_resetKeyboard(); -#endif // __SCAN_LOOP_H - diff --git a/Scan/BETKB/scan_loop.h b/Scan/BETKB/scan_loop.h index 14ba30b..fd5bfdc 100644 --- a/Scan/BETKB/scan_loop.h +++ b/Scan/BETKB/scan_loop.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2012,2014 by Jacob Alexander +/* Copyright (C) 2012,2014-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __SCAN_LOOP_H -#define __SCAN_LOOP_H +#pragma once // ----- Includes ----- @@ -62,6 +61,3 @@ void Scan_lockKeyboard( void ); void Scan_unlockKeyboard( void ); void Scan_resetKeyboard( void ); - -#endif // __SCAN_LOOP_H - diff --git a/Scan/BudKeypad/matrix.h b/Scan/BudKeypad/matrix.h index b53de14..6c74e2d 100644 --- a/Scan/BudKeypad/matrix.h +++ b/Scan/BudKeypad/matrix.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 by Jacob Alexander +/* Copyright (C) 2011,2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __MATRIX_H -#define __MATRIX_H +#pragma once // ----- Includes ----- @@ -74,7 +73,3 @@ static const uint8_t matrix_pinout[][MAX_ROW_SIZE + 1] = { }; - - -#endif // __MATRIX_H - diff --git a/Scan/DPH/scan_loop.h b/Scan/DPH/scan_loop.h index fc2bbbb..83a9a1b 100644 --- a/Scan/DPH/scan_loop.h +++ b/Scan/DPH/scan_loop.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2014 by Jacob Alexander +/* Copyright (C) 2013-2015 by Jacob Alexander * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -14,8 +14,7 @@ * License along with this library. If not, see . */ -#ifndef __SCAN_LOOP_H -#define __SCAN_LOOP_H +#pragma once // ----- Includes ----- @@ -56,6 +55,3 @@ uint8_t Scan_sendData( uint8_t dataPayload ); void Scan_finishedWithMacro( uint8_t sentKeys ); void Scan_finishedWithOutput( uint8_t sentKeys ); - -#endif // __SCAN_LOOP_H - diff --git a/Scan/EpsonQX-10/scan_loop.h b/Scan/EpsonQX-10/scan_loop.h index 572c706..16e1eee 100644 --- a/Scan/EpsonQX-10/scan_loop.h +++ b/Scan/EpsonQX-10/scan_loop.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011,2014 by Jacob Alexander +/* Copyright (C) 2011,2014-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __SCAN_LOOP_H -#define __SCAN_LOOP_H +#pragma once // ----- Includes ----- @@ -61,6 +60,3 @@ void Scan_lockKeyboard( void ); void Scan_unlockKeyboard( void ); void Scan_resetKeyboard( void ); - -#endif // __SCAN_LOOP_H - diff --git a/Scan/FACOM6684/scan_loop.h b/Scan/FACOM6684/scan_loop.h index cdb7ee6..6b68ee1 100644 --- a/Scan/FACOM6684/scan_loop.h +++ b/Scan/FACOM6684/scan_loop.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2014 by Jacob Alexander +/* Copyright (C) 2013-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __SCAN_LOOP_H -#define __SCAN_LOOP_H +#pragma once // ----- Includes ----- @@ -62,6 +61,3 @@ void Scan_lockKeyboard( void ); void Scan_unlockKeyboard( void ); void Scan_resetKeyboard( void ); - -#endif // __SCAN_LOOP_H - diff --git a/Scan/HP150/scan_loop.h b/Scan/HP150/scan_loop.h index 14ba30b..6f454d5 100644 --- a/Scan/HP150/scan_loop.h +++ b/Scan/HP150/scan_loop.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2012,2014 by Jacob Alexander +/* Copyright (C) 2012,2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __SCAN_LOOP_H -#define __SCAN_LOOP_H +#pragma once // ----- Includes ----- @@ -62,6 +61,3 @@ void Scan_lockKeyboard( void ); void Scan_unlockKeyboard( void ); void Scan_resetKeyboard( void ); - -#endif // __SCAN_LOOP_H - diff --git a/Scan/HeathZenith/matrix.h b/Scan/HeathZenith/matrix.h index 54587b4..134ae70 100644 --- a/Scan/HeathZenith/matrix.h +++ b/Scan/HeathZenith/matrix.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 by Jacob Alexander +/* Copyright (C) 2011,2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __MATRIX_H -#define __MATRIX_H +#pragma once // ----- Includes ----- @@ -63,7 +62,3 @@ static const uint8_t matrix_pinout[][MAX_ROW_SIZE + 1] = { }; - - -#endif // __MATRIX_H - diff --git a/Scan/IBMConvertible/matrix.h b/Scan/IBMConvertible/matrix.h index 190e588..9cbcbad 100644 --- a/Scan/IBMConvertible/matrix.h +++ b/Scan/IBMConvertible/matrix.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2012 by Jacob Alexander +/* Copyright (C) 2012,2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __MATRIX_H -#define __MATRIX_H +#pragma once // ----- Includes ----- @@ -67,7 +66,3 @@ static const uint8_t matrix_pinout[][MAX_COL_SIZE + 1] = { }; - - -#endif // __MATRIX_H - diff --git a/Scan/ISSILed/led_scan.c b/Scan/ISSILed/led_scan.c index ef2400a..dfa54d7 100644 --- a/Scan/ISSILed/led_scan.c +++ b/Scan/ISSILed/led_scan.c @@ -23,6 +23,7 @@ #include #include #include +#include // Located with scan_loop.c // Local Includes #include "led_scan.h" @@ -139,6 +140,8 @@ const uint8_t LED_ledEnableMask[] = { 0x43, 0x43, // C9-1 -> C9-16 }; */ + +/* const uint8_t LED_ledEnableMask[] = { 0xE8, // I2C address 0x00, // Starting register address @@ -153,8 +156,10 @@ const uint8_t LED_ledEnableMask[] = { 0x00, 0x00, // C8-1 -> C8-16 0x00, 0x00, // C9-1 -> C9-16 }; +*/ +/* // XXX Pre-fill example of buffers const uint8_t examplePage[] = { 0xE8, // I2C address @@ -169,8 +174,8 @@ const uint8_t examplePage[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // C8-1 -> C8-16 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // C9-1 -> C9-16 }; +*/ -/* // XXX Pre-fill example of buffers const uint8_t examplePage[] = { 0xE8, // I2C address @@ -185,7 +190,6 @@ const uint8_t examplePage[] = { 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, // C8-1 -> C8-16 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, // C9-1 -> C9-16 }; -*/ @@ -429,15 +433,14 @@ inline void LED_setup() // Initialize I2C I2C_setup(); - /* TODO Make work // Zero out Frame Registers // This needs to be done before disabling the hardware shutdown (or the leds will do undefined things) LED_zeroPages( 0x0B, 1, 0x00, 0x0C ); // Control Registers // Disable Hardware shutdown of ISSI chip (pull high) - GPIOD_PDDR |= (1<<1); - PORTD_PCR1 = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1); - GPIOD_PSOR |= (1<<1); + GPIOB_PDDR |= (1<<16); + PORTB_PCR16 = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1); + GPIOB_PSOR |= (1<<16); // Clear LED Pages LED_zeroPages( 0x00, 8, 0x00, 0xB4 ); // LED Registers @@ -447,7 +450,6 @@ inline void LED_setup() // Disable Software shutdown of ISSI chip LED_writeReg( 0x0A, 0x01, 0x0B ); - */ } diff --git a/Scan/ISSILed/led_scan.h b/Scan/ISSILed/led_scan.h index a948a97..71d8e80 100644 --- a/Scan/ISSILed/led_scan.h +++ b/Scan/ISSILed/led_scan.h @@ -14,8 +14,7 @@ * along with this file. If not, see . */ -#ifndef __LED_SCAN_H -#define __LED_SCAN_H +#pragma once // ----- Includes ----- @@ -29,6 +28,3 @@ void LED_setup(); uint8_t LED_scan(); - -#endif // __LED_SCAN_H - diff --git a/Scan/Kaypro1/scan_loop.h b/Scan/Kaypro1/scan_loop.h index 9ee4b01..cd73e6b 100644 --- a/Scan/Kaypro1/scan_loop.h +++ b/Scan/Kaypro1/scan_loop.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2014 by Jacob Alexander +/* Copyright (C) 2011-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __SCAN_LOOP_H -#define __SCAN_LOOP_H +#pragma once // ----- Includes ----- @@ -62,6 +61,3 @@ void Scan_lockKeyboard( void ); void Scan_unlockKeyboard( void ); void Scan_resetKeyboard( void ); - -#endif // __SCAN_LOOP_H - diff --git a/Scan/MBC-55X/defaultMap.h b/Scan/MBC-55X/defaultMap.h index 0893567..fbf6529 100644 --- a/Scan/MBC-55X/defaultMap.h +++ b/Scan/MBC-55X/defaultMap.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2014 by Jacob Alexander +/* Copyright (C) 2013-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __KEYMAP_H -#define __KEYMAP_H +#pragma once // This file contains various key layouts for the Sanyo MBC-55X Computer Keyboard @@ -287,5 +286,3 @@ static uint8_t DefaultMap_Lookup[] = { 0, // 0xFF }; -#endif - diff --git a/Scan/MBC-55X/scan_loop.h b/Scan/MBC-55X/scan_loop.h index c2f87e4..6b68ee1 100644 --- a/Scan/MBC-55X/scan_loop.h +++ b/Scan/MBC-55X/scan_loop.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2013,2014 by Jacob Alexander +/* Copyright (C) 2013-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __SCAN_LOOP_H -#define __SCAN_LOOP_H +#pragma once // ----- Includes ----- @@ -62,6 +61,3 @@ void Scan_lockKeyboard( void ); void Scan_unlockKeyboard( void ); void Scan_resetKeyboard( void ); - -#endif // __SCAN_LOOP_H - diff --git a/Scan/MD1/matrix.h b/Scan/MD1/matrix.h index 55cc068..10a15d7 100644 --- a/Scan/MD1/matrix.h +++ b/Scan/MD1/matrix.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 by Jacob Alexander +/* Copyright (C) 2014-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __MATRIX_H -#define __MATRIX_H +#pragma once // ----- Includes ----- @@ -55,6 +54,3 @@ GPIO_Pin Matrix_rows[] = { gpio(D,1), gpio(D,2), gpio(D,3), gpio(D,4), gpio(D,5) // Define type of scan matrix Config Matrix_type = Config_Pulldown; - -#endif // __MATRIX_H - diff --git a/Scan/MD1/scan_loop.h b/Scan/MD1/scan_loop.h index a61b4a1..17a06fc 100644 --- a/Scan/MD1/scan_loop.h +++ b/Scan/MD1/scan_loop.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 by Jacob Alexander +/* Copyright (C) 2014-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __SCAN_LOOP_H -#define __SCAN_LOOP_H +#pragma once // ----- Includes ----- @@ -39,6 +38,3 @@ uint8_t Scan_loop( void ); void Scan_finishedWithMacro( uint8_t sentKeys ); // Called by Macro Module void Scan_finishedWithOutput( uint8_t sentKeys ); // Called by Output Module - -#endif // __SCAN_LOOP_H - diff --git a/Scan/MD2/matrix.h b/Scan/MD2/matrix.h index 7241e0e..cb360e4 100644 --- a/Scan/MD2/matrix.h +++ b/Scan/MD2/matrix.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 by Jacob Alexander +/* Copyright (C) 2014-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __MATRIX_H -#define __MATRIX_H +#pragma once // ----- Macros ----- @@ -58,6 +57,3 @@ GPIO_Pin Matrix_rows[] = { gpio(D,1), gpio(D,2), gpio(D,3), gpio(D,4), gpio(D,5) // Define type of scan matrix Config Matrix_type = Config_Pulldown; - -#endif // __MATRIX_H - diff --git a/Scan/MD2/scan_loop.h b/Scan/MD2/scan_loop.h index a61b4a1..17a06fc 100644 --- a/Scan/MD2/scan_loop.h +++ b/Scan/MD2/scan_loop.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 by Jacob Alexander +/* Copyright (C) 2014-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __SCAN_LOOP_H -#define __SCAN_LOOP_H +#pragma once // ----- Includes ----- @@ -39,6 +38,3 @@ uint8_t Scan_loop( void ); void Scan_finishedWithMacro( uint8_t sentKeys ); // Called by Macro Module void Scan_finishedWithOutput( uint8_t sentKeys ); // Called by Output Module - -#endif // __SCAN_LOOP_H - diff --git a/Scan/MatrixARM/matrix_scan.h b/Scan/MatrixARM/matrix_scan.h index 13839a1..06ae75f 100644 --- a/Scan/MatrixARM/matrix_scan.h +++ b/Scan/MatrixARM/matrix_scan.h @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __MATRIX_SCAN_H -#define __MATRIX_SCAN_H +#pragma once // ----- Includes ----- @@ -140,6 +139,3 @@ typedef struct KeyState { void Matrix_setup(); void Matrix_scan( uint16_t scanNum ); - -#endif // __MATRIX_SCAN_H - diff --git a/Scan/MatrixARM/matrix_setup.h b/Scan/MatrixARM/matrix_setup.h index 0f48c77..f169586 100644 --- a/Scan/MatrixARM/matrix_setup.h +++ b/Scan/MatrixARM/matrix_setup.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 by Jacob Alexander +/* Copyright (C) 2014-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __MATRIX_SETUP_H -#define __MATRIX_SETUP_H +#pragma once // ----- Macros ----- @@ -30,6 +29,3 @@ #define Matrix_rowsNum sizeof( Matrix_rows ) / sizeof( GPIO_Pin ) #define Matrix_maxKeys sizeof( Matrix_scanArray ) / sizeof( KeyState ) - -#endif // __MATRIX_SETUP_H - diff --git a/Scan/MicroSwitch8304/scan_loop.h b/Scan/MicroSwitch8304/scan_loop.h index 36e11da..a091d09 100644 --- a/Scan/MicroSwitch8304/scan_loop.h +++ b/Scan/MicroSwitch8304/scan_loop.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011,2014 by Jacob Alexander +/* Copyright (C) 2011,2014-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __SCAN_LOOP_H -#define __SCAN_LOOP_H +#pragma once // ----- Includes ----- @@ -62,6 +61,3 @@ void Scan_lockKeyboard( void ); void Scan_unlockKeyboard( void ); void Scan_resetKeyboard( void ); - -#endif // __SCAN_LOOP_H - diff --git a/Scan/SKM67001/customSKM.h b/Scan/SKM67001/customSKM.h index 0c04c7b..b210868 100644 --- a/Scan/SKM67001/customSKM.h +++ b/Scan/SKM67001/customSKM.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2012,2014 by Jacob Alexander +/* Copyright (C) 2012,2014-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __KEYMAP_H -#define __KEYMAP_H +#pragma once // ----- Variables ----- @@ -114,6 +113,3 @@ static uint8_t DefaultMap_Lookup[] = { 0, // 0x55 }; - -#endif - diff --git a/Scan/SKM67001/defaultMap.h b/Scan/SKM67001/defaultMap.h index 11160d1..773d298 100644 --- a/Scan/SKM67001/defaultMap.h +++ b/Scan/SKM67001/defaultMap.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2012,2014 by Jacob Alexander +/* Copyright (C) 2012,2014-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __KEYMAP_H -#define __KEYMAP_H +#pragma once // This file contains various key layouts for the SKM 67001 Keyboard from the Olympia Professional ES 105 Typewriter @@ -116,6 +115,3 @@ static uint8_t DefaultMap_Lookup[] = { 0, // 0x55 }; - -#endif - diff --git a/Scan/SKM67001/matrix.h b/Scan/SKM67001/matrix.h index 406e97c..26f9cb6 100644 --- a/Scan/SKM67001/matrix.h +++ b/Scan/SKM67001/matrix.h @@ -1,15 +1,15 @@ -/* Copyright (C) 2012 by Jacob Alexander - * +/* Copyright (C) 2012,2015 by Jacob Alexander + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __MATRIX_H -#define __MATRIX_H +#pragma once // ----- Includes ----- @@ -73,7 +72,3 @@ static const uint8_t matrix_pinout[][MAX_ROW_SIZE + 1] = { }; - - -#endif // __MATRIX_H - diff --git a/Scan/STLcd/lcd_scan.h b/Scan/STLcd/lcd_scan.h index 4a519b9..36884a2 100644 --- a/Scan/STLcd/lcd_scan.h +++ b/Scan/STLcd/lcd_scan.h @@ -14,8 +14,7 @@ * along with this file. If not, see . */ -#ifndef __LCD_SCAN_H -#define __LCD_SCAN_H +#pragma once // ----- Includes ----- @@ -29,6 +28,3 @@ void LCD_setup(); uint8_t LCD_scan(); - -#endif // __LCD_SCAN_H - diff --git a/Scan/SonyNEWS/scan_loop.h b/Scan/SonyNEWS/scan_loop.h index 572c706..a1abb98 100644 --- a/Scan/SonyNEWS/scan_loop.h +++ b/Scan/SonyNEWS/scan_loop.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011,2014 by Jacob Alexander +/* Copyright (C) 2011,2014-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,9 +19,6 @@ * THE SOFTWARE. */ -#ifndef __SCAN_LOOP_H -#define __SCAN_LOOP_H - // ----- Includes ----- // Compiler Includes @@ -61,6 +58,3 @@ void Scan_lockKeyboard( void ); void Scan_unlockKeyboard( void ); void Scan_resetKeyboard( void ); - -#endif // __SCAN_LOOP_H - diff --git a/Scan/SonyOA-S3400/scan_loop.h b/Scan/SonyOA-S3400/scan_loop.h index 7dcfc1c..65312a9 100644 --- a/Scan/SonyOA-S3400/scan_loop.h +++ b/Scan/SonyOA-S3400/scan_loop.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2012,2014 by Jacob Alexander +/* Copyright (C) 2012,2014-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,9 +19,6 @@ * THE SOFTWARE. */ -#ifndef __SCAN_LOOP_H -#define __SCAN_LOOP_H - // ----- Includes ----- // Compiler Includes @@ -62,6 +59,3 @@ void Scan_lockKeyboard( void ); void Scan_unlockKeyboard( void ); void Scan_resetKeyboard( void ); - -#endif // __SCAN_LOOP_H - diff --git a/Scan/Tandy1000/scan_loop.h b/Scan/Tandy1000/scan_loop.h index abdff4f..1daf9b9 100644 --- a/Scan/Tandy1000/scan_loop.h +++ b/Scan/Tandy1000/scan_loop.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011,2014 by Jacob Alexander +/* Copyright (C) 2011,2014-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __SCAN_LOOP_H -#define __SCAN_LOOP_H +#pragma once // ----- Includes ----- @@ -62,6 +61,3 @@ void Scan_lockKeyboard( void ); void Scan_unlockKeyboard( void ); void Scan_resetKeyboard( void ); - -#endif // __SCAN_LOOP_H - diff --git a/Scan/UARTConnect/connect_scan.h b/Scan/UARTConnect/connect_scan.h index 94e7738..9ba6da1 100644 --- a/Scan/UARTConnect/connect_scan.h +++ b/Scan/UARTConnect/connect_scan.h @@ -14,8 +14,7 @@ * along with this file. If not, see . */ -#ifndef __CONNECT_SCAN_H -#define __CONNECT_SCAN_H +#pragma once // ----- Includes ----- @@ -117,6 +116,3 @@ typedef struct AnimationCommand { void Connect_setup( uint8_t master ); void Connect_scan(); - -#endif // __CONNECT_SCAN_H - diff --git a/Scan/UnivacF3W9/scan_loop.h b/Scan/UnivacF3W9/scan_loop.h index 95a7232..9151672 100644 --- a/Scan/UnivacF3W9/scan_loop.h +++ b/Scan/UnivacF3W9/scan_loop.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2012,2014 by Jacob Alexander +/* Copyright (C) 2012,2014-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __SCAN_LOOP_H -#define __SCAN_LOOP_H +#pragma once // ----- Includes ----- @@ -61,6 +60,3 @@ void Scan_lockKeyboard( void ); void Scan_unlockKeyboard( void ); void Scan_resetKeyboard( void ); - -#endif // __SCAN_LOOP_H - diff --git a/Scan/matrix/matrix_scan.h b/Scan/matrix/matrix_scan.h index 2c3a65f..c89e216 100644 --- a/Scan/matrix/matrix_scan.h +++ b/Scan/matrix/matrix_scan.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011,2014 by Jacob Alexander +/* Copyright (C) 2011,2014-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __MATRIX_SCAN_H -#define __MATRIX_SCAN_H +#pragma once // ----- Includes ----- @@ -119,5 +118,3 @@ void matrix_pinSetup( uint8_t *matrix, uint8_t scanType ); void matrix_scan( uint8_t *matrix, uint8_t *detectArray ); -#endif // __MATRIX_SCAN_H - diff --git a/Scan/matrix/matrix_template.h b/Scan/matrix/matrix_template.h index 41ca233..a56456f 100644 --- a/Scan/matrix/matrix_template.h +++ b/Scan/matrix/matrix_template.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011,2014 by Jacob Alexander +/* Copyright (C) 2011,2014-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __MATRIX_H -#define __MATRIX_H +#pragma once // ----- Includes ----- @@ -147,7 +146,3 @@ static const uint8_t matrix_pinout[][MAX_ROW_SIZE + 1] = { }; - - -#endif // __MATRIX_H - diff --git a/Scan/matrix/scan_loop.h b/Scan/matrix/scan_loop.h index 89e5688..1366c50 100644 --- a/Scan/matrix/scan_loop.h +++ b/Scan/matrix/scan_loop.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2012,2014 by Jacob Alexander +/* Copyright (C) 2011-2012,2014-2015 by Jacob Alexander * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -19,8 +19,7 @@ * THE SOFTWARE. */ -#ifndef __SCAN_LOOP_H -#define __SCAN_LOOP_H +#pragma once // ----- Includes ----- @@ -63,6 +62,3 @@ uint8_t Scan_loop( void ); void Scan_finishedWithBuffer( uint8_t sentKeys ); void Scan_finishedWithUSBBuffer( uint8_t sentKeys ); - -#endif // __SCAN_LOOP_H - diff --git a/main.c b/main.c index 98e72e1..2e2fe85 100644 --- a/main.c +++ b/main.c @@ -40,17 +40,6 @@ extern volatile uint32_t systick_millis_count; int main() { - /* - GPIOA_PDDR |= (1<<5); - // Setup pin - A5 - See Lib/pin_map.mchck for more details on pins - PORTA_PCR5 = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1); - while( 1 ) - { - GPIOA_PTOR |= (1<<5); - for (uint32_t d = 0; d < 720000; d++ ); - } - */ - // AVR - Teensy Set Clock speed to 16 MHz #if defined(_at90usb162_) || defined(_atmega32u4_) || defined(_at90usb646_) || defined(_at90usb1286_) CLKPR = 0x80;