X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/17d06b849440eaab17b0b3778e4dae12182eb98c..34dc7f241fe0627e21c3a218123d5d9fbc97374c:/Projects/AVRISP/AVRISP.c diff --git a/Projects/AVRISP/AVRISP.c b/Projects/AVRISP/AVRISP.c index d4ae910f6..44b8356cd 100644 --- a/Projects/AVRISP/AVRISP.c +++ b/Projects/AVRISP/AVRISP.c @@ -34,9 +34,6 @@ * the project and is responsible for the initial application hardware configuration. */ -// TODO: Add in software SPI for lower programming speeds below 125KHz -// TODO: Add reversed target connector checks - #include "AVRISP.h" /** Main program entry point. This routine contains the overall program flow, including initial @@ -46,7 +43,7 @@ int main(void) { SetupHardware(); - V2Params_LoadEEPROMParamValues(); + V2Params_LoadNonVolatileParamValues(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); @@ -54,11 +51,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(); } } @@ -84,7 +78,7 @@ void SetupHardware(void) ADC_StartReading(VTARGET_ADC_CHANNEL | ADC_RIGHT_ADJUSTED | ADC_REFERENCE_AVCC); #endif - /* Millisecond timer initialization for timeout checking */ + /* Millisecond timer initialization for timeouts and delays */ OCR0A = ((F_CPU / 64) / 1000); TCCR0A = (1 << WGM01); TCCR0B = ((1 << CS01) | (1 << CS00));