diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-12-03 07:42:56 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-12-03 07:42:56 +0000 |
commit | a5adbae652bcf5382ef34d71da4d11de15b482a6 (patch) | |
tree | 62e488d28a757ce67b514c368a497c1bf1536b08 /Projects/AVRISP/Lib/PDITarget.h | |
parent | f69f03cb0d02937dee018264f0ac4e9be76fc1f4 (diff) | |
download | lufa-a5adbae652bcf5382ef34d71da4d11de15b482a6.tar.gz lufa-a5adbae652bcf5382ef34d71da4d11de15b482a6.tar.bz2 lufa-a5adbae652bcf5382ef34d71da4d11de15b482a6.zip |
Document the PDI programming routines implemented so far in the AVRISP project. Add ability to selectively disable ISP programming support in addition to the existing ability to disable PDI programming support.
Diffstat (limited to 'Projects/AVRISP/Lib/PDITarget.h')
-rw-r--r-- | Projects/AVRISP/Lib/PDITarget.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Projects/AVRISP/Lib/PDITarget.h b/Projects/AVRISP/Lib/PDITarget.h index cc8c7dbc5..55a1a9562 100644 --- a/Projects/AVRISP/Lib/PDITarget.h +++ b/Projects/AVRISP/Lib/PDITarget.h @@ -39,6 +39,8 @@ /* Includes: */
#include <avr/io.h>
#include <stdbool.h>
+
+ #include <LUFA/Common/Common.h>
/* Defines: */
#define PDIDATA_LINE_PORT PORTB
@@ -64,8 +66,12 @@ #define PD_CTRL_REG 2
#define PDI_STATUS_NVM (1 << 1)
+
#define PDI_RESET_KEY 0x59
+ #define PDI_NVMENABLE_KEY (uint8_t[]){0x12, 0x89, 0xAB, 0x45, 0xCD, 0xD8, 0x88, 0xFF}
+ #define TOGGLE_PDI_CLOCK MACROS{ PDICLOCK_LINE_PORT ^= PDICLOCK_LINE_MASK; \
+ PDICLOCK_LINE_PORT ^= PDICLOCK_LINE_MASK; }MACROE
/* Function Prototypes: */
void PDITarget_SendByte(uint8_t Byte);
|