diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-12-14 02:59:34 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-12-14 02:59:34 +0000 |
commit | 1fa27139f5c195c0d7147dac0c5332a6ea10229a (patch) | |
tree | 9cb1450d78252d7360fd87c0f28db9cabe85782c /Projects/AVRISP/Lib/PDIProtocol.h | |
parent | 66482341573c035e4c90cee32b89fb7f59068e40 (diff) | |
download | lufa-1fa27139f5c195c0d7147dac0c5332a6ea10229a.tar.gz lufa-1fa27139f5c195c0d7147dac0c5332a6ea10229a.tar.bz2 lufa-1fa27139f5c195c0d7147dac0c5332a6ea10229a.zip |
Split out NVM access code in the AVRISP project into a seperate NVMTarget.c source file and header. Make NVM register accesses use the NVM base address as set by the host, rather than using the fixed value from the XMEGA datasheet.
Diffstat (limited to 'Projects/AVRISP/Lib/PDIProtocol.h')
-rw-r--r-- | Projects/AVRISP/Lib/PDIProtocol.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Projects/AVRISP/Lib/PDIProtocol.h b/Projects/AVRISP/Lib/PDIProtocol.h index ea26e4ba6..490e14bf5 100644 --- a/Projects/AVRISP/Lib/PDIProtocol.h +++ b/Projects/AVRISP/Lib/PDIProtocol.h @@ -43,10 +43,11 @@ #include "V2Protocol.h"
#include "PDITarget.h"
+ #include "NVMTarget.h"
/* Preprocessor Checks: */
- #if (BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1)
- #undef ENABLE_ISP_PROTOCOL
+ #if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))
+ #undef ENABLE_ISP_PROTOCOL
#if !defined(ENABLE_PDI_PROTOCOL)
#define ENABLE_PDI_PROTOCOL
@@ -94,6 +95,12 @@ #define XPRG_PARAM_NVMBASE 0x01
#define XPRG_PARAM_EEPPAGESIZE 0x02
+ #define XPRG_PROTOCOL_PDI 0x00
+ #define XPRG_PROTOCOL_JTAG 0x01
+
+ /* External Variables: */
+ extern uint32_t XPROG_Param_NVMBase;
+
/* Function Prototypes: */
void PDIProtocol_XPROG_SetMode(void);
void PDIProtocol_XPROG_Command(void);
|