aboutsummaryrefslogtreecommitdiff
path: root/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c
diff options
context:
space:
mode:
authorDean Camera <[email protected]>2010-06-25 13:19:05 +0000
committerDean Camera <[email protected]>2010-06-25 13:19:05 +0000
commit016a4c068a01b0baf28bc45ec1eba16460689f9a (patch)
treed575d799e6583cb0889bc89939246b23c9f59373 /Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c
parent26afe5fe9e75a506805c155f8fa69000e0f92515 (diff)
downloadqmk_firmware-016a4c068a01b0baf28bc45ec1eba16460689f9a.tar.gz
qmk_firmware-016a4c068a01b0baf28bc45ec1eba16460689f9a.zip
Make loops in AVRISP-MKII Clone project's XPROG protocol infinite rather than looping on the timeout value, as this is already checked inside the loop anyway.
Diffstat (limited to 'Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c')
-rw-r--r--Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c b/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c
index f9815043f5..e0e2479eab 100644
--- a/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c
+++ b/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c
@@ -77,7 +77,7 @@ static void TINYNVM_SendWriteNVMRegister(const uint8_t Address)
bool TINYNVM_WaitWhileNVMBusBusy(void)
{
/* Poll the STATUS register to check to see if NVM access has been enabled */
- while (TimeoutMSRemaining)
+ for (;;)
{
/* Send the SLDCS command to read the TPI STATUS register to see the NVM bus is active */
XPROGTarget_SendByte(TPI_CMD_SLDCS | TPI_STATUS_REG);
@@ -95,8 +95,6 @@ bool TINYNVM_WaitWhileNVMBusBusy(void)
return true;
}
}
-
- return false;
}
/** Waits while the target's NVM controller is busy performing an operation, exiting if the
@@ -107,7 +105,7 @@ bool TINYNVM_WaitWhileNVMBusBusy(void)
bool TINYNVM_WaitWhileNVMControllerBusy(void)
{
/* Poll the STATUS register to check to see if NVM access has been enabled */
- while (TimeoutMSRemaining)
+ for (;;)
{
/* Send the SIN command to read the TPI STATUS register to see the NVM bus is busy */
TINYNVM_SendReadNVMRegister(XPROG_Param_NVMCSRRegAddr);
@@ -125,8 +123,6 @@ bool TINYNVM_WaitWhileNVMControllerBusy(void)
return true;
}
}
-
- return false;
}
/** Reads memory from the target's memory spaces.