diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-05-27 10:36:21 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-05-27 10:36:21 +0000 |
commit | 3b95b8dedced6c118cfb2cd7fc72c696c076119e (patch) | |
tree | 7e1f25f5fa95b9e295d490a61ab6e040588b7649 /Projects/AVRISP-MKII/Lib | |
parent | 8d993afc5388c5f3d0ff568c607f7fed6bb7390e (diff) | |
download | lufa-3b95b8dedced6c118cfb2cd7fc72c696c076119e.tar.gz lufa-3b95b8dedced6c118cfb2cd7fc72c696c076119e.tar.bz2 lufa-3b95b8dedced6c118cfb2cd7fc72c696c076119e.zip |
Added new VTARGET_REF_VOLTS and VTARGET_SCALE_FACTOR compile time defines to the AVRISP-MKII programmer project to set the VTARGET reference voltage and scale factor.
Fixed XPLAINBridge project not correctly reading the XMEGA's supply voltage when reporting back to the host.
Diffstat (limited to 'Projects/AVRISP-MKII/Lib')
-rw-r--r-- | Projects/AVRISP-MKII/Lib/V2ProtocolParams.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Projects/AVRISP-MKII/Lib/V2ProtocolParams.c b/Projects/AVRISP-MKII/Lib/V2ProtocolParams.c index de21f0ff2..bc3ed18e0 100644 --- a/Projects/AVRISP-MKII/Lib/V2ProtocolParams.c +++ b/Projects/AVRISP-MKII/Lib/V2ProtocolParams.c @@ -98,7 +98,7 @@ void V2Params_UpdateParamValues(void) { #if (defined(ADC) && !defined(NO_VTARGET_DETECT)) /* Update VTARGET parameter with the latest ADC conversion of VTARGET on supported AVR models */ - V2Params_SetParameterValue(PARAM_VTARGET, ((5 * 10 * ADC_GetResult()) / 1024)); + V2Params_GetParamFromTable(PARAM_VTARGET)->ParamValue = (((uint16_t)(VTARGET_REF_VOLTS * 10 * VTARGET_SCALE_FACTOR) * ADC_GetResult()) / 1024); #endif } |