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.

This commit is contained in:
Dean Camera 2009-12-03 07:42:56 +00:00
parent f69f03cb0d
commit a5adbae652
11 changed files with 88 additions and 62 deletions

View file

@ -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_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);