@ -37,7 +37,7 @@
# include "V2ProtocolParams.h"
# include "V2ProtocolParams.h"
/* Non-Volatile Parameter Values for EEPROM storage */
/* Non-Volatile Parameter Values for EEPROM storage */
static uint8_t EEMEM EEPROM_Res t_Polarity = 0x00 ;
static uint8_t EEMEM EEPROM_Res e t_Polarity = 0x00 ;
/* Volatile Parameter Values for RAM storage */
/* Volatile Parameter Values for RAM storage */
static ParameterItem_t ParameterTable [ ] =
static ParameterItem_t ParameterTable [ ] =
@ -71,7 +71,7 @@ static ParameterItem_t ParameterTable[] =
. ParamValue = 6 } ,
. ParamValue = 6 } ,
{ . ParamID = PARAM_RESET_POLARITY ,
{ . ParamID = PARAM_RESET_POLARITY ,
. ParamPrivileges = PARAM_PRIV_ WRITE,
. ParamPrivileges = PARAM_PRIV_ READ | PARAM_PRIV_ WRITE,
. ParamValue = 0x01 } ,
. ParamValue = 0x01 } ,
{ . ParamID = PARAM_STATUS_TGT_CONN ,
{ . ParamID = PARAM_STATUS_TGT_CONN ,
@ -79,7 +79,7 @@ static ParameterItem_t ParameterTable[] =
. ParamValue = STATUS_ISP_READY } ,
. ParamValue = STATUS_ISP_READY } ,
{ . ParamID = PARAM_DISCHARGEDELAY ,
{ . ParamID = PARAM_DISCHARGEDELAY ,
. ParamPrivileges = PARAM_PRIV_ WRITE,
. ParamPrivileges = PARAM_PRIV_ READ | PARAM_PRIV_ WRITE,
. ParamValue = 0x00 } ,
. ParamValue = 0x00 } ,
} ;
} ;
@ -88,7 +88,7 @@ static ParameterItem_t ParameterTable[] =
void V2Params_LoadNonVolatileParamValues ( void )
void V2Params_LoadNonVolatileParamValues ( void )
{
{
/* Target RESET line polarity is a non-volatile value, retrieve current parameter value from EEPROM */
/* 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_Res t_Polarity) ;
V2Params_GetParamFromTable ( PARAM_RESET_POLARITY ) - > ParamValue = eeprom_read_byte ( & EEPROM_Res e t_Polarity) ;
}
}
/** Updates any parameter values that are sourced from hardware rather than explicitly set by the host, such as
/** Updates any parameter values that are sourced from hardware rather than explicitly set by the host, such as
@ -163,7 +163,7 @@ void V2Params_SetParameterValue(const uint8_t ParamID,
/* The target RESET line polarity is a non-volatile parameter, save to EEPROM when changed */
/* 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_update_byte ( & EEPROM_Res t_Polarity, Value ) ;
eeprom_update_byte ( & EEPROM_Res e t_Polarity, Value ) ;
}
}
/** Retrieves a parameter entry (including ID, value and privileges) from the parameter table that matches the given
/** Retrieves a parameter entry (including ID, value and privileges) from the parameter table that matches the given