Skip to content

Commit

Permalink
Fix indentation compiler warnings.
Browse files Browse the repository at this point in the history
Add a sleep timer on the status display.  this prevents chewing up your
console buffer and using needless CPU cycles
  • Loading branch information
jgstroud committed Oct 20, 2020
2 parents 36eb532 + 506fc7b commit 999574b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion SerialFlash.c
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2019,7 +2019,7 @@ int SerialFlash_DieErase(int Index)
{
if (SerialFlash_protectBlock(false, Index) == SerialFlash_FALSE)
return false;
SerialFlash_Enable4ByteAddrMode(true, Index);
SerialFlash_Enable4ByteAddrMode(true, Index);
// printf("Die erase!\n");

// send request
Expand Down
3 changes: 2 additions & 1 deletion dpcmd.c
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ int main(int argc, char *argv[])

if (iExitCode != EXCODE_PASS)
goto Exit;
iExitCode=Handler();
iExitCode=Handler();

Exit:
printf("\n\n");
Expand Down Expand Up @@ -1542,6 +1542,7 @@ bool Wait(const char* strOK,const char* strFail)
if (g_bDisplayTimer == true) {
timersub(&tv, &basetv, &diff);
printf("\r%0.1fs elapsed", diff.tv_sec + 0.000001 * diff.tv_usec);
Sleep(500);
}
}
printf("\n");
Expand Down
2 changes: 1 addition & 1 deletion project.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void PrepareProgramParameters(int Index);
bool ValidateProgramParameters(int Index);
bool IdentifyChipBeforeOperation(int Index);

inline int Sleep(unsigned int mSec)
static inline int Sleep(unsigned int mSec)
{
return usleep(mSec * 1000);
}
Expand Down

0 comments on commit 999574b

Please sign in to comment.