aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-02-09 12:30:51 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-02-09 12:30:51 +0000
commit35a0fe93848cc6e1a79d2e606a2e3f6a84ba5755 (patch)
tree66d7ecb248071bca4f6159d783ba0970bf37caa1 /Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c
parent3ab0b3a027db2549bc024780d7787061705056f6 (diff)
downloadlufa-35a0fe93848cc6e1a79d2e606a2e3f6a84ba5755.tar.gz
lufa-35a0fe93848cc6e1a79d2e606a2e3f6a84ba5755.tar.bz2
lufa-35a0fe93848cc6e1a79d2e606a2e3f6a84ba5755.zip
Fixed USB_GetHIDReportSize() returning the number of bits in the specified report instead of bytes.
Moved the USB_GetHIDReportItemInfo() calls into the main report item passing loop in the *HostWithParser demos - it is fast enough not to effect performance, and avoids duplicate code. Make Webserver project report the LUFA version as part of the HTTP header.
Diffstat (limited to 'Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c')
-rw-r--r--Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c b/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c
index 90559208d..91ed775bb 100644
--- a/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c
+++ b/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c
@@ -167,10 +167,6 @@ bool TINYNVM_WriteMemory(const uint16_t WriteAddress, uint8_t* WriteBuffer, uint
while (WriteLength)
{
- /* Wait until the NVM controller is no longer busy */
- if (!(TINYNVM_WaitWhileNVMControllerBusy()))
- return false;
-
/* Write the low byte of data to the target */
XPROGTarget_SendByte(TPI_CMD_SST | TPI_POINTER_INDIRECT_PI);
XPROGTarget_SendByte(*(WriteBuffer++));
@@ -179,6 +175,10 @@ bool TINYNVM_WriteMemory(const uint16_t WriteAddress, uint8_t* WriteBuffer, uint
XPROGTarget_SendByte(TPI_CMD_SST | TPI_POINTER_INDIRECT_PI);
XPROGTarget_SendByte(*(WriteBuffer++));
+ /* Wait until the NVM controller is no longer busy */
+ if (!(TINYNVM_WaitWhileNVMControllerBusy()))
+ return false;
+
/* Need to decrement the write length twice, since we read out a whole word */
WriteLength -= 2;
}