- #define PROGRAMMER_ID "AVRISP_MK2"\r
- \r
- /** Mask for the reading or writing of the high byte in a FLASH word when issuing a low-level programming command */\r
- #define READ_WRITE_HIGH_BYTE_MASK (1 << 3)\r
+ #define PROGRAMMER_ID "AVRISP_MK2"\r
+\r
+ /** Timeout in milliseconds of target busy-wait loops waiting for a command to complete */\r
+ #define TARGET_BUSY_TIMEOUT_MS 240\r
+\r
+ /* Inline Functions: */\r
+ /** Blocking delay for a given number of milliseconds, via a hardware timer.\r
+ *\r
+ * \param[in] DelayMS Number of milliseconds to delay for\r
+ */\r
+ static inline void V2Protocol_DelayMS(uint8_t DelayMS)\r
+ {\r
+ TCNT0 = 0;\r
+ while (TCNT0 < DelayMS);\r
+ }
+\r
+ /* External Variables: */\r
+ extern uint32_t CurrentAddress;\r
+ extern bool MustSetAddress;\r