Stub out more of the TPI programming protocol routines in the AVRISP project.

This commit is contained in:
Dean Camera 2009-12-23 13:28:44 +00:00
parent be71f934a4
commit bd5e8f07b7
11 changed files with 174 additions and 31 deletions

View file

@ -64,6 +64,26 @@
#define PROG_MODE_PAGED_READYBUSY_MASK (1 << 6)
#define PROG_MODE_COMMIT_PAGE_MASK (1 << 7)
/* Inline Functions: */
/** Blocking delay for a given number of milliseconds, via a hardware timer.
*
* \param[in] DelayMS Number of milliseconds to delay for
*/
static inline void ISPProtocol_DelayMS(uint8_t DelayMS)
{
TCNT0 = 0;
TIFR0 = (1 << OCF1A);
while (DelayMS)
{
if (TIFR0 & (1 << OCF1A))
{
TIFR0 = (1 << OCF1A);
DelayMS--;
}
}
}
/* Function Prototypes: */
void ISPProtocol_EnterISPMode(void);
void ISPProtocol_LeaveISPMode(void);