projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Minor documentation cleanups.
[pub/USBasp.git]
/
Projects
/
AVRISP-MKII
/
Lib
/
V2Protocol.c
diff --git
a/Projects/AVRISP-MKII/Lib/V2Protocol.c
b/Projects/AVRISP-MKII/Lib/V2Protocol.c
index
3e12bdc
..
d6bb32a
100644
(file)
--- 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;
/** 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 Must
Set
Address;
+/** Flag to indicate that the next read/write operation must update the device's current
extended FLASH
address */
+bool Must
LoadExtended
Address;
/** ISR to manage timeouts whilst processing a V2Protocol command */
/** 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);
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);
Endpoint_Write_Byte(CMD_LOAD_ADDRESS);
Endpoint_Write_Byte(STATUS_CMD_OK);