/*\r
LUFA Library\r
- Copyright (C) Dean Camera, 2009.\r
+ Copyright (C) Dean Camera, 2010.\r
\r
dean [at] fourwalledcubicle [dot] com\r
www.fourwalledcubicle.com\r
*/\r
\r
/*\r
- Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+ Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
\r
Permission to use, copy, modify, distribute, and sell this \r
software and its documentation for any purpose is hereby granted\r
SPI_SPEED_FCPU_DIV_8, // AVRStudio = 1MHz SPI, Actual = 1MHz SPI\r
SPI_SPEED_FCPU_DIV_16, // AVRStudio = 500KHz SPI, Actual = 500KHz SPI\r
SPI_SPEED_FCPU_DIV_32, // AVRStudio = 250KHz SPI, Actual = 250KHz SPI\r
- SPI_SPEED_FCPU_DIV_64 // AVRStudio = 125KHz SPI, Actual = 125KHz SPI \r
+ SPI_SPEED_FCPU_DIV_64, // AVRStudio = 125KHz SPI, Actual = 125KHz SPI\r
#elif (F_CPU == 16000000)\r
SPI_SPEED_FCPU_DIV_2, // AVRStudio = 8MHz SPI, Actual = 8MHz SPI\r
SPI_SPEED_FCPU_DIV_4, // AVRStudio = 4MHz SPI, Actual = 4MHz SPI\r
SPI_SPEED_FCPU_DIV_8, // AVRStudio = 2MHz SPI, Actual = 2MHz SPI\r
SPI_SPEED_FCPU_DIV_16, // AVRStudio = 1MHz SPI, Actual = 1MHz SPI\r
SPI_SPEED_FCPU_DIV_32, // AVRStudio = 500KHz SPI, Actual = 500KHz SPI\r
- SPI_SPEED_FCPU_DIV_64, // AVRStudio = 250KHz SPI, Actual = 250KHz SPI \r
+ SPI_SPEED_FCPU_DIV_64, // AVRStudio = 250KHz SPI, Actual = 250KHz SPI\r
SPI_SPEED_FCPU_DIV_128 // AVRStudio = 125KHz SPI, Actual = 125KHz SPI\r
#else\r
#error No SPI prescaler masks for chosen F_CPU speed.\r
{\r
if (ResetTarget)\r
{\r
- RESET_LINE_DDR |= RESET_LINE_MASK;\r
+ AUX_LINE_DDR |= AUX_LINE_MASK;\r
\r
if (!(V2Params_GetParameterValue(PARAM_RESET_POLARITY)))\r
- RESET_LINE_PORT |= RESET_LINE_MASK;\r
+ AUX_LINE_PORT |= AUX_LINE_MASK;\r
}\r
else\r
{\r
- RESET_LINE_DDR &= ~RESET_LINE_MASK;\r
- RESET_LINE_PORT &= ~RESET_LINE_MASK;\r
+ AUX_LINE_DDR &= ~AUX_LINE_MASK;\r
+ AUX_LINE_PORT &= ~AUX_LINE_MASK;\r
}\r
}\r
\r
}\r
\r
/** Waits until the target has completed the last operation, by continuously polling the device's\r
- * BUSY flag until it is cleared, or until the \ref TARGET_BUSY_TIMEOUT_MS timeout period has expired.\r
+ * BUSY flag until it is cleared, or until the command timeout period has expired.\r
*\r
* \return V2 Protocol status \ref STATUS_CMD_OK if the no timeout occurred, \ref STATUS_RDY_BSY_TOUT otherwise\r
*/\r
*/\r
void ISPTarget_LoadExtendedAddress(void)\r
{\r
- SPI_SendByte(0x4D);\r
+ SPI_SendByte(LOAD_EXTENDED_ADDRESS_CMD);\r
SPI_SendByte(0x00);\r
SPI_SendByte((CurrentAddress & 0x00FF0000) >> 16);\r
SPI_SendByte(0x00); \r