* set to an appropriate ADC channel number in the project makefile for VTARGET detection to operate correctly. On models\r
* without an ADC converter, VTARGET will report at a fixed 5V level.\r
*\r
- * Connections to the device are simple for SPI programming:\r
+ * When compiled for the XPLAIN board target, this will automatically configure itself for the correct connections to the\r
+ * XPLAIN's XMEGA AVR, and will enable only PDI programming support.\r
+ *\r
+ *\r
+ * Connections to the device for SPI programming (when enabled):\r
*\r
* <table>\r
* <tr>\r
* <b><sup>2</sup></b> <i>See \ref SSec_Options section</i>\r
*\r
*\r
- * Connections to the device are simple for SPI programming:\r
+ * Connections to the device for PDI programming (when enabled):\r
*\r
* <table>\r
* <tr>\r
* <tr>\r
* <td>RESET_LINE_PORT</td>\r
* <td>Makefile CDEFS</td>\r
- * <td>PORT register for the programmer's target RESET line.</td>\r
+ * <td>PORT register for the programmer's target RESET line. <i>Ignored when compiled for the XPLAIN board.</i></td>\r
* </tr>\r
* <tr>\r
* <td>RESET_LINE_DDR</td>\r
* <td>Makefile CDEFS</td>\r
- * <td>DDR register for the programmer's target RESET line.</td>\r
+ * <td>DDR register for the programmer's target RESET line. <i>Ignored when compiled for the XPLAIN board.</i></td>\r
* </tr>\r
* <tr>\r
* <td>RESET_LINE_MASK</td>\r
* <td>Makefile CDEFS</td>\r
* <td>Mask for the programmer's target RESET line on the chosen port. <b>Must not be the AVR's /SS pin</b>, as the\r
* target pins are tri-stated when not in use, and low signals on the /SS pin will force SPI slave mode when the\r
- * pin is configured as an input. When in PDI programming mode, this is the target clock pin.</td>\r
+ * pin is configured as an input. When in PDI programming mode, this is the target clock pin.\r
+ * <i>Ignored when compiled for the XPLAIN board.</i></td>\r
* </tr>\r
* <tr>\r
* <td>VTARGET_ADC_CHANNEL</td>\r
* <tr>\r
* <td>ENABLE_SPI_PROTOCOL</td>\r
* <td>Makefile CDEFS</td>\r
- * <td>Define to enable SPI programming protocol support.</td> \r
+ * <td>Define to enable SPI programming protocol support. <i>Ignored when compiled for the XPLAIN board.</i></td> \r
* </tr>\r
* <tr>\r
* <td>ENABLE_XPROG_PROTOCOL</td>\r
* <td>Makefile CDEFS</td>\r
- * <td>Define to enable XMEGA PDI programming protocol support.</td> \r
+ * <td>Define to enable XMEGA PDI programming protocol support. <i>Ignored when compiled for the XPLAIN board.</i></td> \r
* </tr>\r
* </table>\r
*/\r
#include <avr/io.h>\r
\r
#include "V2Protocol.h"\r
+ \r
+ /* Preprocessor Checks: */\r
+ #if BOARD == BOARD_XPLAIN\r
+ #undef ENABLE_SPI_PROTOCOL\r
+ #define ENABLE_PDI_PROTOCOL\r
+ #endif\r
\r
/* Macros: */\r
/** Mask for the reading or writing of the high byte in a FLASH word when issuing a low-level programming command */\r
#include "V2ProtocolConstants.h"\r
#include "V2ProtocolParams.h"\r
\r
+ /* Preprocessor Checks: */\r
+ #if BOARD == BOARD_XPLAIN\r
+ #undef ENABLE_SPI_PROTOCOL\r
+ #define ENABLE_PDI_PROTOCOL\r
+ #endif\r
+\r
/* Macros: */\r
/** Total number of allowable ISP programming speeds supported by the device */\r
#define TOTAL_ISP_PROGRAMMING_SPEEDS 7\r
#include "V2Protocol.h"\r
#include "PDITarget.h"\r
\r
+ /* Preprocessor Checks: */\r
+ #if BOARD == BOARD_XPLAIN\r
+ #undef ENABLE_SPI_PROTOCOL\r
+ #define ENABLE_PDI_PROTOCOL\r
+ #endif\r
+\r
/* Macros: */\r
#define XPRG_CMD_ENTER_PROGMODE 0x01\r
#define XPRG_CMD_LEAVE_PROGMODE 0x02\r
\r
#include <LUFA/Common/Common.h>\r
\r
+ /* Preprocessor Checks: */\r
+ #if BOARD == BOARD_XPLAIN\r
+ #undef ENABLE_SPI_PROTOCOL\r
+ #define ENABLE_PDI_PROTOCOL\r
+ #endif\r
+\r
/* Defines: */\r
- #define PDIDATA_LINE_PORT PORTB\r
- #define PDIDATA_LINE_DDR DDRB\r
- #define PDIDATA_LINE_PIN PINB\r
- #define PDIDATA_LINE_MASK (1 << 2)\r
+ #if BOARD == BOARD_XPLAIN\r
+ #define PDIDATA_LINE_PORT PORTD\r
+ #define PDIDATA_LINE_DDR DDRD\r
+ #define PDIDATA_LINE_PIN PIND\r
+ #define PDIDATA_LINE_MASK (1 << 2)\r
+ \r
+ #define PDICLOCK_LINE_PORT PORTD\r
+ #define PDICLOCK_LINE_DDR DDRD\r
+ #define PDICLOCK_LINE_MASK (1 << 5)\r
+ #else\r
+ #define PDIDATA_LINE_PORT PORTB\r
+ #define PDIDATA_LINE_DDR DDRB\r
+ #define PDIDATA_LINE_PIN PINB\r
+ #define PDIDATA_LINE_MASK (1 << 2)\r
+ \r
+ #define PDICLOCK_LINE_PORT RESET_LINE_PORT\r
+ #define PDICLOCK_LINE_DDR RESET_LINE_DDR\r
+ #define PDICLOCK_LINE_MASK RESET_LINE_MASK\r
+ #endif\r
\r
- #define PDICLOCK_LINE_PORT RESET_LINE_PORT\r
- #define PDICLOCK_LINE_DDR RESET_LINE_DDR\r
- #define PDICLOCK_LINE_MASK RESET_LINE_MASK\r
-\r
#define PDI_CMD_LDS 0x00\r
#define PDI_CMD_LD 0x20\r
#define PDI_CMD_STS 0x40\r
#include "V2ProtocolParams.h"
#include "ISPProtocol.h"\r
#include "PDIProtocol.h"\r
+\r
+ /* Preprocessor Checks: */\r
+ #if BOARD == BOARD_XPLAIN\r
+ #undef ENABLE_SPI_PROTOCOL\r
+ #define ENABLE_PDI_PROTOCOL\r
+ #endif\r
/* Macros: */\r
/** Programmer ID string, returned to the host during the CMD_SIGN_ON command processing */