|
|
@ -420,12 +420,21 @@ static void XPROGProtocol_SetParam(void)
|
|
|
|
uint8_t XPROGParam = Endpoint_Read_Byte();
|
|
|
|
uint8_t XPROGParam = Endpoint_Read_Byte();
|
|
|
|
|
|
|
|
|
|
|
|
/* Determine which parameter is being set, store the new parameter value */
|
|
|
|
/* Determine which parameter is being set, store the new parameter value */
|
|
|
|
if (XPROGParam == XPRG_PARAM_NVMBASE)
|
|
|
|
switch (XPROGParam)
|
|
|
|
XPROG_Param_NVMBase = Endpoint_Read_DWord_BE();
|
|
|
|
{
|
|
|
|
else if (XPROGParam == XPRG_PARAM_EEPPAGESIZE)
|
|
|
|
case XPRG_PARAM_NVMBASE:
|
|
|
|
XPROG_Param_EEPageSize = Endpoint_Read_Word_BE();
|
|
|
|
XPROG_Param_NVMBase = Endpoint_Read_DWord_BE();
|
|
|
|
else
|
|
|
|
break;
|
|
|
|
ReturnStatus = XPRG_ERR_FAILED;
|
|
|
|
case XPRG_PARAM_EEPPAGESIZE:
|
|
|
|
|
|
|
|
XPROG_Param_EEPageSize = Endpoint_Read_Word_BE();
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case XPRG_PARAM_UNDOC_1:
|
|
|
|
|
|
|
|
case XPRG_PARAM_UNDOC_2:
|
|
|
|
|
|
|
|
break; // Undocumented TPI parameter, just accept and discard
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
ReturnStatus = XPRG_ERR_FAILED;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Endpoint_ClearOUT();
|
|
|
|
Endpoint_ClearOUT();
|
|
|
|
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
|
|
|
|
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
|
|
|
|