Skip to content

Commit

Permalink
clang-format -i -style=WebKit
Browse files Browse the repository at this point in the history
re-format the code to be consistent and have correct indentation.

Signed-off-by: Stefan Reinauer <[email protected]>
  • Loading branch information
reinauer committed Nov 21, 2020
1 parent ec86ad4 commit befae16
Show file tree
Hide file tree
Showing 16 changed files with 2,807 additions and 2,784 deletions.
14 changes: 7 additions & 7 deletions ChipInfoDb.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

#include "Macro.h"

#define NUMBER_OF_SUPPORTING_CHIPS 3
#define NUMBER_OF_SUPPORTING_CHIPS 3

struct m_code_api {
int (*m_code_api_doRDSR)(unsigned char *cSR, int Index);
int (*m_code_api_doWRSR)(unsigned char cSR,int Index);
int (*m_code_api_doChipErase)(int Index);
int (*m_code_api_doProgram)(void);
int (*m_code_api_doRead)(char *name);
int (*m_code_api_doSegmentErase)(void);
int (*m_code_api_doRDSR)(unsigned char* cSR, int Index);
int (*m_code_api_doWRSR)(unsigned char cSR, int Index);
int (*m_code_api_doChipErase)(int Index);
int (*m_code_api_doProgram)(void);
int (*m_code_api_doRead)(char* name);
int (*m_code_api_doSegmentErase)(void);
};

bool Dedi_List_AllChip(void);
Expand Down
2 changes: 1 addition & 1 deletion FlashCommand.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

/// CFlashCommand Implementations
#include "Macro.h"
#include "FlashCommand.h"
#include "Macro.h"
#include "project.h"
#include "usbdriver.h"
#define SerialFlash_FALSE -1
Expand Down
20 changes: 10 additions & 10 deletions FlashCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@

#include "Macro.h"

#define FlashCommand_TRUE 1
#define FlashCommand_FALSE 0
#define FlashCommand_TRUE 1
#define FlashCommand_FALSE 0

int FlashCommand_TransceiveOut(unsigned char *v, int len,int has_result_in,int Index);
int FlashCommand_TransceiveOut(unsigned char* v, int len, int has_result_in, int Index);

int FlashCommand_TransceiveIn(unsigned char *v, int len,int Index);
int FlashCommand_TransceiveIn(unsigned char* v, int len, int Index);

int FlashCommand_SendCommand_OutOnlyInstruction(unsigned char *v, int len, int Index);
int FlashCommand_SendCommand_OutOnlyInstruction(unsigned char* v, int len, int Index);

int FlashCommand_SendCommand_OutInstructionWithCS(unsigned char *v,int len, int Index);
int FlashCommand_SendCommand_OutInstructionWithCS(unsigned char* v, int len, int Index);

int FlashCommand_SendCommand_OneOutOneIn(unsigned char *vOut, int out_len, unsigned char *vIn, int in_len, int Index );
int FlashCommand_SendCommand_OneOutOneIn(unsigned char* vOut, int out_len, unsigned char* vIn, int in_len, int Index);

int FlashCommand_SendCommand_SetupPacketForBulkWrite(struct CAddressRange *AddrRange, unsigned char modeWrite,unsigned char WriteCom,int Index);
int FlashCommand_SendCommand_SetupPacketForBulkWrite(struct CAddressRange* AddrRange, unsigned char modeWrite, unsigned char WriteCom, int Index);

int FlashCommand_SendCommand_SetupPacketForAT45DBBulkWrite(struct CAddressRange *AddrRange, unsigned char modeWrite,unsigned char WriteCom,int Index);
int FlashCommand_SendCommand_SetupPacketForAT45DBBulkWrite(struct CAddressRange* AddrRange, unsigned char modeWrite, unsigned char WriteCom, int Index);

int FlashCommand_SendCommand_SetupPacketForBulkRead(struct CAddressRange *AddrRange, unsigned char modeRead,unsigned char ReadCom,int Index);
int FlashCommand_SendCommand_SetupPacketForBulkRead(struct CAddressRange* AddrRange, unsigned char modeRead, unsigned char ReadCom, int Index);

#endif //FLASHCOMMANDS
3 changes: 2 additions & 1 deletion IntelHexFile.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ bool HexFileToBin(const char* filePath, unsigned char* vOutData, unsigned long*
return false; // 0x0a != Line[0] && NULL != Line[0]) return false;
}

if (Line[i] == '\n') Line[i] = '\0';
if (Line[i] == '\n')
Line[i] = '\0';

/* Scan the first two bytes and nb of bytes.
The two bytes are read in First_Word since it's use depend on the
Expand Down
6 changes: 3 additions & 3 deletions IntelHexFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,16 @@ typedef struct {
unsigned char intel_lg_data;
unsigned short intel_adr;
unsigned char intel_type;
unsigned char intel_data [LL_MAX_LINE];
unsigned char intel_data[LL_MAX_LINE];
unsigned char intel_lrc;
} t_one_line;

#define INTEL_DATA_TYPE 0

//save binary data in vBuffer to file in Intel Hex format
bool BinToHexFile(const char* filePath, unsigned char* vBuffer, unsigned long FileSize) ;
bool BinToHexFile(const char* filePath, unsigned char* vBuffer, unsigned long FileSize);

// read binary data from Intel Hex file
bool HexFileToBin(const char* filePath, unsigned char* vOutData,unsigned long* FileSize,unsigned char PaddingByte) ;
bool HexFileToBin(const char* filePath, unsigned char* vOutData, unsigned long* FileSize, unsigned char PaddingByte);

#endif // end of header file
Loading

0 comments on commit befae16

Please sign in to comment.