Auto-configure AVRISP programmer configuration when built for the XPLAIN board to match the XPLAIN hardware connections.
This commit is contained in:
parent
a5adbae652
commit
f1baf12fae
6 changed files with 62 additions and 16 deletions
|
@ -40,6 +40,12 @@
|
|||
#include <avr/io.h>
|
||||
|
||||
#include "V2Protocol.h"
|
||||
|
||||
/* Preprocessor Checks: */
|
||||
#if BOARD == BOARD_XPLAIN
|
||||
#undef ENABLE_SPI_PROTOCOL
|
||||
#define ENABLE_PDI_PROTOCOL
|
||||
#endif
|
||||
|
||||
/* Macros: */
|
||||
/** Mask for the reading or writing of the high byte in a FLASH word when issuing a low-level programming command */
|
||||
|
|
|
@ -47,6 +47,12 @@
|
|||
#include "V2ProtocolConstants.h"
|
||||
#include "V2ProtocolParams.h"
|
||||
|
||||
/* Preprocessor Checks: */
|
||||
#if BOARD == BOARD_XPLAIN
|
||||
#undef ENABLE_SPI_PROTOCOL
|
||||
#define ENABLE_PDI_PROTOCOL
|
||||
#endif
|
||||
|
||||
/* Macros: */
|
||||
/** Total number of allowable ISP programming speeds supported by the device */
|
||||
#define TOTAL_ISP_PROGRAMMING_SPEEDS 7
|
||||
|
|
|
@ -43,6 +43,12 @@
|
|||
#include "V2Protocol.h"
|
||||
#include "PDITarget.h"
|
||||
|
||||
/* Preprocessor Checks: */
|
||||
#if BOARD == BOARD_XPLAIN
|
||||
#undef ENABLE_SPI_PROTOCOL
|
||||
#define ENABLE_PDI_PROTOCOL
|
||||
#endif
|
||||
|
||||
/* Macros: */
|
||||
#define XPRG_CMD_ENTER_PROGMODE 0x01
|
||||
#define XPRG_CMD_LEAVE_PROGMODE 0x02
|
||||
|
|
|
@ -42,16 +42,33 @@
|
|||
|
||||
#include <LUFA/Common/Common.h>
|
||||
|
||||
/* Defines: */
|
||||
#define PDIDATA_LINE_PORT PORTB
|
||||
#define PDIDATA_LINE_DDR DDRB
|
||||
#define PDIDATA_LINE_PIN PINB
|
||||
#define PDIDATA_LINE_MASK (1 << 2)
|
||||
|
||||
#define PDICLOCK_LINE_PORT RESET_LINE_PORT
|
||||
#define PDICLOCK_LINE_DDR RESET_LINE_DDR
|
||||
#define PDICLOCK_LINE_MASK RESET_LINE_MASK
|
||||
/* Preprocessor Checks: */
|
||||
#if BOARD == BOARD_XPLAIN
|
||||
#undef ENABLE_SPI_PROTOCOL
|
||||
#define ENABLE_PDI_PROTOCOL
|
||||
#endif
|
||||
|
||||
/* Defines: */
|
||||
#if BOARD == BOARD_XPLAIN
|
||||
#define PDIDATA_LINE_PORT PORTD
|
||||
#define PDIDATA_LINE_DDR DDRD
|
||||
#define PDIDATA_LINE_PIN PIND
|
||||
#define PDIDATA_LINE_MASK (1 << 2)
|
||||
|
||||
#define PDICLOCK_LINE_PORT PORTD
|
||||
#define PDICLOCK_LINE_DDR DDRD
|
||||
#define PDICLOCK_LINE_MASK (1 << 5)
|
||||
#else
|
||||
#define PDIDATA_LINE_PORT PORTB
|
||||
#define PDIDATA_LINE_DDR DDRB
|
||||
#define PDIDATA_LINE_PIN PINB
|
||||
#define PDIDATA_LINE_MASK (1 << 2)
|
||||
|
||||
#define PDICLOCK_LINE_PORT RESET_LINE_PORT
|
||||
#define PDICLOCK_LINE_DDR RESET_LINE_DDR
|
||||
#define PDICLOCK_LINE_MASK RESET_LINE_MASK
|
||||
#endif
|
||||
|
||||
#define PDI_CMD_LDS 0x00
|
||||
#define PDI_CMD_LD 0x20
|
||||
#define PDI_CMD_STS 0x40
|
||||
|
|
|
@ -45,6 +45,12 @@
|
|||
#include "V2ProtocolParams.h"
|
||||
#include "ISPProtocol.h"
|
||||
#include "PDIProtocol.h"
|
||||
|
||||
/* Preprocessor Checks: */
|
||||
#if BOARD == BOARD_XPLAIN
|
||||
#undef ENABLE_SPI_PROTOCOL
|
||||
#define ENABLE_PDI_PROTOCOL
|
||||
#endif
|
||||
|
||||
/* Macros: */
|
||||
/** Programmer ID string, returned to the host during the CMD_SIGN_ON command processing */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue