Skip to content

Commit

Permalink
Merge pull request DediProgSW#33 from samek-h/feature/fix-ld-multdefs
Browse files Browse the repository at this point in the history
Fix of global variable usage (allowing GCC 10 compilation without linker errors)
  • Loading branch information
Benwang217 authored Oct 26, 2020
2 parents ff2db59 + 3f9ecf2 commit 7340e7a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions dpcmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,5 @@ bool Wait(const char* strOK,const char* strFail);
void ExitProgram(void);
int FirmwareUpdate();
void sin_handler(int sig);
int ctrlCCount;
long int tvSec;
long int tvUsec;

#endif
3 changes: 3 additions & 0 deletions usbdriver.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ extern bool isSendFFsequence;
#define SerialFlash_FALSE -1
#define SerialFlash_TRUE 1

static int dev_index;
static usb_device_entry_t usb_device_entry[MAX_Dev_Index];
static usb_dev_handle *dediprog_handle[MAX_Dev_Index];


bool Is_NewUSBCommand(int Index)
{
if(is_SF100nBoardVersionGreaterThan_5_5_0(Index) || is_SF600nBoardVersionGreaterThan_6_9_0(Index))
Expand Down
3 changes: 0 additions & 3 deletions usbdriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ typedef struct {
unsigned long Length;
} CNTRPIPE_RQ, *PCNTRPIPE_RQ;

usb_device_entry_t usb_device_entry[MAX_Dev_Index];

/* Set/clear LEDs on dediprog */
#define PASS_ON (0 << 0)
#define PASS_OFF (1 << 0)
Expand All @@ -54,7 +52,6 @@ usb_device_entry_t usb_device_entry[MAX_Dev_Index];
#define ERROR_ON (0 << 2)
#define ERROR_OFF (1 << 2)

int dev_index;
int usb_driver_init(void);
int get_usb_dev_cnt(void);
int usb_driver_release(void);
Expand Down

0 comments on commit 7340e7a

Please sign in to comment.