diff options
author | Dean Camera <[email protected]> | 2010-05-14 10:11:40 +0000 |
---|---|---|
committer | Dean Camera <[email protected]> | 2010-05-14 10:11:40 +0000 |
commit | 80d85090baa9b5c6abf4c3e550a63486d4252839 (patch) | |
tree | b2ef0a6fee94b52fcd6d4f10c1002a0f6d521d3a /Projects/AVRISP-MKII/Lib/V2ProtocolParams.c | |
parent | 6b7770ef2b7f0a7210d8a69ca2edaca1b468815d (diff) | |
download | qmk_firmware-80d85090baa9b5c6abf4c3e550a63486d4252839.tar.gz qmk_firmware-80d85090baa9b5c6abf4c3e550a63486d4252839.zip |
Fixed AVRISP project sending a LOAD EXTENDED ADDRESS command to 128KB AVRs after programming or reading from the last page of FLASH.
Diffstat (limited to 'Projects/AVRISP-MKII/Lib/V2ProtocolParams.c')
-rw-r--r-- | Projects/AVRISP-MKII/Lib/V2ProtocolParams.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Projects/AVRISP-MKII/Lib/V2ProtocolParams.c b/Projects/AVRISP-MKII/Lib/V2ProtocolParams.c index b8c5930a0e..e12fa2d248 100644 --- a/Projects/AVRISP-MKII/Lib/V2ProtocolParams.c +++ b/Projects/AVRISP-MKII/Lib/V2ProtocolParams.c @@ -44,11 +44,11 @@ static ParameterItem_t ParameterTable[] = { { .ParamID = PARAM_BUILD_NUMBER_LOW, .ParamPrivileges = PARAM_PRIV_READ, - .ParamValue = (LUFA_VERSION_INTEGER >> 8) }, + .ParamValue = 0 }, { .ParamID = PARAM_BUILD_NUMBER_HIGH, .ParamPrivileges = PARAM_PRIV_READ, - .ParamValue = (LUFA_VERSION_INTEGER & 0xFF), }, + .ParamValue = 0 }, { .ParamID = PARAM_HW_VER, .ParamPrivileges = PARAM_PRIV_READ, @@ -87,8 +87,7 @@ static ParameterItem_t ParameterTable[] = /** Loads saved non-volatile parameter values from the EEPROM into the parameter table, as needed. */ void V2Params_LoadNonVolatileParamValues(void) { - /* Target RESET line polarity is a non-volatile value, retrieve current parameter value from EEPROM - - * NB: Cannot call V2Protocol_SetParameterValue() here, as that will cause another EEPROM write! */ + /* Target RESET line polarity is a non-volatile value, retrieve current parameter value from EEPROM */ V2Params_GetParamFromTable(PARAM_RESET_POLARITY)->ParamValue = eeprom_read_byte(&EEPROM_Rest_Polarity); } @@ -154,7 +153,7 @@ void V2Params_SetParameterValue(const uint8_t ParamID, const uint8_t Value) ParamInfo->ParamValue = Value; /* The target RESET line polarity is a non-volatile parameter, save to EEPROM when changed */ - if (ParamID == PARAM_RESET_POLARITY) + if ((ParamID == PARAM_RESET_POLARITY) && (eeprom_read_byte(&EEPROM_Rest_Polarity) != Value)) eeprom_write_byte(&EEPROM_Rest_Polarity, Value); } |