Move ADC VTARGET sampling to a new V2Params_UpdateParamValues() in the AVRISP project so that there is a central place where all non-PC set target values can be updated easily.

This commit is contained in:
Dean Camera 2009-08-30 03:51:44 +00:00
parent 4bb236e9a0
commit 244c86429b
3 changed files with 24 additions and 9 deletions

View file

@ -46,7 +46,7 @@ int main(void)
{
SetupHardware();
V2Params_LoadEEPROMParamValues();
V2Params_LoadNonVolatileParamValues();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
@ -54,11 +54,8 @@ int main(void)
{
Process_AVRISP_Commands();
#if defined(ADC)
/* Update VTARGET parameter with the latest ADC conversion of VTARGET on supported AVR models */
V2Params_SetParameterValue(PARAM_VTARGET, ((5 * 10 * ADC_GetResult()) / 1024));
#endif
V2Params_UpdateParamValues();
USB_USBTask();
}
}