/* Send the address of the location to read from */\r
TINYNVM_SendPointerAddress(ReadAddress);\r
\r
- while (ReadSize--)\r
+ while (ReadSize-- && TimeoutMSRemaining)\r
{\r
/* Read the byte of data from the target */\r
XPROGTarget_SendByte(TPI_CMD_SLD | TPI_POINTER_INDIRECT_PI);\r
*(ReadBuffer++) = XPROGTarget_ReceiveByte();\r
}\r
\r
- return true;\r
+ return (TimeoutMSRemaining != 0);\r
}\r
\r
/** Writes word addressed memory to the target's memory spaces.\r