Code cleanup

- Changing header file ifndef define to pragma once's
- Removed duplicate output_com.h's
This commit is contained in:
Jacob Alexander 2015-06-14 13:56:56 -07:00
parent 03f60df94d
commit 5f262ea4b6
75 changed files with 158 additions and 650 deletions

View file

@ -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

View file

@ -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

View file

@ -1,5 +1,5 @@
// Originally Generated from MCHCK Toolkit
/* Copyright (c) Jacob Alexander 2014 <haata@kiibohd.com>
/* Copyright (c) Jacob Alexander 2014-2015 <haata@kiibohd.com>
*
* 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 <http://www.gnu.org/licenses/>.
*/
#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

View file

@ -15,8 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#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

View file

@ -15,8 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#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

View file

@ -1,5 +1,5 @@
/* Copyright (c) 2011,2012 Simon Schubert <2@0x2c.org>.
* Modifications by Jacob Alexander 2014 <haata@kiibohd.com>
* Modifications by Jacob Alexander 2014-2015 <haata@kiibohd.com>
*
* 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 <http://www.gnu.org/licenses/>.
*/
#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

View file

@ -1,5 +1,5 @@
/* Copyright (c) 2011,2012 Simon Schubert <2@0x2c.org>.
* Modifications by Jacob Alexander 2014 <haata@kiibohd.com>
* Modifications by Jacob Alexander 2014-2015 <haata@kiibohd.com>
*
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef _MCHCK_CDEFS_H
#define _MCHCK_CDEFS_H
#pragma once
// ----- Compiler Includes -----
@ -134,5 +133,3 @@ typedef __CHAR16_TYPE__ char16_t;
) \
)
#endif

View file

@ -1,5 +1,5 @@
/* Copyright (c) 2011,2012 Simon Schubert <2@0x2c.org>.
* Modifications by Jacob Alexander 2014=2015 <haata@kiibohd.com>
* Modifications by Jacob Alexander 2014-2015 <haata@kiibohd.com>
*
* 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 <http://www.gnu.org/licenses/>.
*/
#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

View file

@ -1,5 +1,5 @@
/* Copyright (c) 2011,2012 Simon Schubert <2@0x2c.org>.
* Modifications by Jacob Alexander 2014 <haata@kiibohd.com>
* Modifications by Jacob Alexander 2014-2015 <haata@kiibohd.com>
*
* 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 <http://www.gnu.org/licenses/>.
*/
#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

View file

@ -1,5 +1,5 @@
/* Copyright (c) 2011,2012 Simon Schubert <2@0x2c.org>.
* Modifications by Jacob Alexander 2014 <haata@kiibohd.com>
* Modifications by Jacob Alexander 2014-2015 <haata@kiibohd.com>
*
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef _USB_COMMON_H
#define _USB_COMMON_H
#pragma once
// ----- Enumerations -----
@ -56,5 +55,3 @@ enum {
EP0_BUFSIZE = 64
};
#endif

View file

@ -1,5 +1,5 @@
/* Copyright (c) 2011,2012 Simon Schubert <2@0x2c.org>.
* Modifications by Jacob Alexander 2014 <haata@kiibohd.com>
* Modifications by Jacob Alexander 2014-2015 <haata@kiibohd.com>
*
* 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 <http://www.gnu.org/licenses/>.
*/
#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

View file

@ -1,5 +1,5 @@
/* Copyright (c) 2011,2012 Simon Schubert <2@0x2c.org>.
* Modifications by Jacob Alexander 2014 <haata@kiibohd.com>
* Modifications by Jacob Alexander 2014-2015 <haata@kiibohd.com>
*
* 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 <http://www.gnu.org/licenses/>.
*/
#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

View file

@ -1,5 +1,5 @@
/* Copyright (c) 2011,2012 Simon Schubert <2@0x2c.org>.
* Modifications by Jacob Alexander 2014 <haata@kiibohd.com>
* Modifications by Jacob Alexander 2014-2015 <haata@kiibohd.com>
*
* 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 <http://www.gnu.org/licenses/>.
*/
#pragma once
// ----- Local Includes -----
#include "mchck.h"