/* configure temperature sensor and internal reference voltage channel or VBAT channel function  */
void adc_channel_16_to_18(uint32_t function, ControlStatus newvalue)
/* configure temperature sensor and internal reference voltage channel or VBAT channel function  */
void adc_channel_16_to_18(uint32_t function, ControlStatus newvalue)
{
    if(newvalue) {
        if(RESET != (function & ADC_VBAT_CHANNEL_SWITCH)) {
            ADC_SYNCCTL |= ADC_VBAT_CHANNEL_SWITCH;
        }
        if(RESET != (function & ADC_TEMP_VREF_CHANNEL_SWITCH)) {
            ADC_SYNCCTL |= ADC_TEMP_VREF_CHANNEL_SWITCH;
        }
    } else {
        if(RESET != (function & ADC_VBAT_CHANNEL_SWITCH)) {
            ADC_SYNCCTL &= ~ADC_VBAT_CHANNEL_SWITCH;
        }
        if(RESET != (function & ADC_TEMP_VREF_CHANNEL_SWITCH)) {
            ADC_SYNCCTL &= ~ADC_TEMP_VREF_CHANNEL_SWITCH;
        }
    }
}