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.
This commit is contained in:
parent
8d993afc53
commit
3b95b8dedc
8 changed files with 33 additions and 11 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue