this software.\r
*/\r
\r
-#if defined(ENABLE_XPROG_PROTOCOL)\r
+#if defined(ENABLE_PDI_PROTOCOL) || defined(__DOXYGEN__)\r
\r
#warning PDI Programming Protocol support is incomplete and not currently suitable for use.\r
\r
\r
/* Must hold DATA line high for at least 90nS to enable PDI interface */\r
PDIDATA_LINE_PORT |= PDIDATA_LINE_MASK;\r
- _delay_us(1);\r
+ asm volatile ("NOP"::);\r
+ asm volatile ("NOP"::);\r
\r
/* Toggle CLOCK line 16 times within 100uS of the original 90nS timeout to keep PDI interface enabled */\r
for (uint8_t i = 0; i < 16; i++)\r
\r
/* Enable access to the XPROG NVM bus by sending the documented NVM access key to the device */\r
PDITarget_SendByte(PDI_CMD_KEY); \r
- for (uint8_t i = 0; i < 8; i++)\r
+ for (uint8_t i = 0; i < sizeof(PDI_NVMENABLE_KEY); i++)\r
PDITarget_SendByte(PDI_NVMENABLE_KEY[i]);\r
\r
/* Read out the STATUS register to check that NVM access was successfully enabled */\r