+/** Waits while the target's NVM controller is busy performing an operation, exiting if the\r
+ * timeout period expires.\r
+ *\r
+ * \return Boolean true if the NVM controller became ready within the timeout period, false otherwise\r
+ */\r
+bool TINYNVM_WaitWhileNVMControllerBusy(void)\r
+{\r
+ /* Poll the STATUS register to check to see if NVM access has been enabled */\r
+ while (TimeoutMSRemaining)\r
+ {\r
+ /* Send the SIN command to read the TPI STATUS register to see the NVM bus is active */\r
+ XPROGTarget_SendByte(TPI_CMD_SIN | XPROG_Param_NVMCSRRegAddr);\r
+ if (XPROGTarget_ReceiveByte() & (1 << 7))\r
+ return true;\r
+ }\r
+ \r
+ return false;\r
+}\r
+\r