From 70e700c7e8ade34acd31c1644b2e99a89849f175 Mon Sep 17 00:00:00 2001 From: paul eeepc Date: Tue, 22 Nov 2016 00:52:06 -0600 Subject: [PATCH] Prepending 'shared' to files in shared folder to make more clear that these files should only be edited from the shared folder as they're copied into source folder at compile time. Any edits from source folder will get stopped, and committing shared files outside of shared folder is not desired. --- host/source/inlprog.c | 8 ++------ host/source/usb_operations.c | 15 --------------- host/source/usb_operations.h | 15 +++++++++++++-- host/source/write_operations.c | 14 -------------- host/source/write_operations.h | 16 +++++++++++++++- shared/shared_usb_commands.h | 7 +++++++ shared/usb_commands.h | 7 ------- 7 files changed, 37 insertions(+), 45 deletions(-) create mode 100644 shared/shared_usb_commands.h delete mode 100644 shared/usb_commands.h diff --git a/host/source/inlprog.c b/host/source/inlprog.c index 6a5cfae..26c5c89 100644 --- a/host/source/inlprog.c +++ b/host/source/inlprog.c @@ -13,14 +13,10 @@ #include "dbg.h" #include "usb_operations.h" -#include "usb_commands.h" #include "write_operations.h" - -// vendor requests also defined in firmware -// TODO put in combined .h file for both host and fw -//#define REQ_LED_ON 1 -//#define REQ_LED_OFF 2 +//TODO remove once commands removed from main +#include "shared_usb_commands.h" int main(int argc, char *argv[]) diff --git a/host/source/usb_operations.c b/host/source/usb_operations.c index c24d8aa..e1073ad 100644 --- a/host/source/usb_operations.c +++ b/host/source/usb_operations.c @@ -1,20 +1,5 @@ -#include -#include -#include -#include -#include -#include - -//uncomment to DEBUG this file alone -//#define DEBUG -//"make debug" to get DEBUG msgs on entire program -#include "dbg.h" - #include "usb_operations.h" -//USB timeout -#define SEC_5 5000 - //control transfer request types //uint8_t libusb_control_setup::bmRequestType //Request type. diff --git a/host/source/usb_operations.h b/host/source/usb_operations.h index c7b4bb0..41aba89 100644 --- a/host/source/usb_operations.h +++ b/host/source/usb_operations.h @@ -1,8 +1,19 @@ #ifndef _usb_operations_h #define _usb_operations_h -#include "usb_operations.h" -#include "usb_commands.h" +#include +#include +#include +#include +#include +#include + +//uncomment to DEBUG this file alone +//#define DEBUG +//"make debug" to get DEBUG msgs on entire program +#include "dbg.h" + +#include "shared_usb_commands.h" //control transfer request types //uint8_t libusb_control_setup::bmRequestType diff --git a/host/source/write_operations.c b/host/source/write_operations.c index 2dbb21f..91600bc 100644 --- a/host/source/write_operations.c +++ b/host/source/write_operations.c @@ -1,18 +1,4 @@ -#include -#include -#include -#include -#include -#include - -//uncomment to DEBUG this file alone -#define DEBUG -//"make debug" to get DEBUG msgs on entire program -#include "dbg.h" - #include "write_operations.h" -#include "usb_operations.h" -#include "usb_commands.h" #define SIZE_NES_HEADER 16 #define SIZE_PRG_BANK 16384 diff --git a/host/source/write_operations.h b/host/source/write_operations.h index 201fbeb..892150a 100644 --- a/host/source/write_operations.h +++ b/host/source/write_operations.h @@ -1,7 +1,21 @@ #ifndef _write_operations_h #define _write_operations_h -#include "write_operations.h" +#include +#include +#include +#include +#include +#include + +#include "usb_operations.h" +#include "shared_usb_commands.h" + +//uncomment to DEBUG this file alone +#define DEBUG +//"make debug" to get DEBUG msgs on entire program +#include "dbg.h" + int write_file( libusb_device_handle *usbhandle, char *filename, char *ines_mapper, char *board_config ); diff --git a/shared/shared_usb_commands.h b/shared/shared_usb_commands.h new file mode 100644 index 0000000..2d7c453 --- /dev/null +++ b/shared/shared_usb_commands.h @@ -0,0 +1,7 @@ +#ifndef _shared_usb_commands_h +#define _shared_usb_commands_h + +#define REQ_LED_ON 1 +#define REQ_LED_OFF 2 + +#endif diff --git a/shared/usb_commands.h b/shared/usb_commands.h deleted file mode 100644 index c96b359..0000000 --- a/shared/usb_commands.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _usb_commands_h -#define _usb_commands_h - -#define REQ_LED_ON 1 -#define REQ_LED_OFF 2 - -#endif