diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-05-14 10:11:40 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-05-14 10:11:40 +0000 |
| commit | c85f08f472b44487e5111c3aa8ab862148615ebf (patch) | |
| tree | b2ef0a6fee94b52fcd6d4f10c1002a0f6d521d3a /Projects/AVRISP-MKII/Lib/V2Protocol.c | |
| parent | 5325423337b7cb1e13554cbbc798df6195bb2182 (diff) | |
Fixed AVRISP project sending a LOAD EXTENDED ADDRESS command to 128KB AVRs after programming or reading from the last page of FLASH.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1261 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Projects/AVRISP-MKII/Lib/V2Protocol.c')
| -rw-r--r-- | Projects/AVRISP-MKII/Lib/V2Protocol.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Projects/AVRISP-MKII/Lib/V2Protocol.c b/Projects/AVRISP-MKII/Lib/V2Protocol.c index 3e12bdc1..d6bb32a1 100644 --- a/Projects/AVRISP-MKII/Lib/V2Protocol.c +++ b/Projects/AVRISP-MKII/Lib/V2Protocol.c @@ -39,8 +39,8 @@ /** Current memory address for FLASH/EEPROM memory read/write commands */ uint32_t CurrentAddress; -/** Flag to indicate that the next read/write operation must update the device's current address */ -bool MustSetAddress; +/** Flag to indicate that the next read/write operation must update the device's current extended FLASH address */ +bool MustLoadExtendedAddress; /** ISR to manage timeouts whilst processing a V2Protocol command */ @@ -251,7 +251,8 @@ static void V2Protocol_LoadAddress(void) Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM); Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN); - MustSetAddress = true; + if (CurrentAddress & (1UL << 31)) + MustLoadExtendedAddress = true; Endpoint_Write_Byte(CMD_LOAD_ADDRESS); Endpoint_Write_Byte(STATUS_CMD_OK); |
