mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-15 18:21:07 +00:00
avr.c: Adds avr_tpi_program_enable
Generic function enabling external programming on TPI devices. This function sets the required guard time (which is passed in as parameter), checks the TPI identification register, writes SKEY command + SKEY, and finally polls the NVMEN bit in TPISR. avr.h: Add prototype definitions of avr_tpi_program_enable() and avr_tpi_chip_erase(). avrftdi_tpi.c: Removes tpi_skey_cmd array, containing the SKEY command and the SKEY bytes. tpi.h: Adds tpi_skey_cmd array, containing the SKEY command and the SKEY bytes, but in the reverse order of tpi_skey. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1167 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
2
tpi.h
2
tpi.h
@@ -66,6 +66,8 @@ static const unsigned char tpi_skey[] = { 0x12, 0x89, 0xAB, 0x45, 0xCD, 0xD8, 0x
|
||||
#define TPI_NVMCMD_SECTION_ERASE 0x14
|
||||
#define TPI_NVMCMD_WORD_WRITE 0x1D
|
||||
|
||||
static const unsigned char tpi_skey_cmd[] = { TPI_CMD_SKEY, 0xff, 0x88, 0xd8, 0xcd, 0x45, 0xab, 0x89, 0x12 };
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user