#include "RTE_ADC.h"

#include "Analog_Signals.h"

void RTE_ADC_Init(void)
{
    Analog_Signal_Conv_Init();
}


/*--------------------------------------------------------------------------*/
uint32_t RTE_ForceRead_KL30_Voltage(void)
{
    uint32_t Result = 0x00ul;
    Result = ADC_Conv_Single_Channel(ADC_CH_KL30_VOLTAGE);
    return Result;
}


uint32_t RTE_ForceRead_FUEL1_Voltage(void)
{
    uint32_t Result = 0x00ul;
    Result = ADC_Conv_Single_Channel(ADC_CH_FUEL1);
    return Result;
}
uint32_t RTE_ForceRead_FUEL_VREF_Voltage(void)
{
    uint32_t Result = 0x00ul;
    Result = ADC_Conv_Single_Channel(ADC_CH_FUEL_VREF);
    return Result;
}

/*--------------------------------------------------------------------------*/
uint32_t RTE_Read_KL15_Voltage(void)
{
    uint32_t Result = 0x00ul;
    Result = ADC_Read_Signal(ADC_CH_KL15_VOLTAGE);
    return Result;
}
uint32_t RTE_Read_KL30_Voltage(void)
{
    uint32_t Result = 0x00ul;
    Result = ADC_Read_Signal(ADC_CH_KL30_VOLTAGE);
    return Result;
}

uint32_t RTE_Read_FUEL1_Voltage(void)
{
    uint32_t Result = 0x00ul;
    Result = ADC_Read_Signal(ADC_CH_FUEL1);
    return Result;
}
uint32_t RTE_Read_FUEL_VREF_Voltage(void)
{
    uint32_t Result = 0x00ul;
    Result = ADC_Read_Signal(ADC_CH_FUEL_VREF);
    return Result;
}
/*--------------------------------------------------------------------------*/

uint8_t RTE_Read_KL30_Valid(void)
{
    uint8_t Result = 0x00u;
    Result = ADC_Read_Signal_Valid(ADC_CH_KL30_VOLTAGE);
    return Result;
}

uint8_t RTE_Read_FUEL1_Valid(void)
{
    uint8_t Result = 0x00u;
    Result = ADC_Read_Signal_Valid(ADC_CH_FUEL1);
    return Result;
}
uint8_t RTE_Read_FUEL_VREF_Valid(void)
{
    uint8_t Result = 0x00u;
    Result = ADC_Read_Signal_Valid(ADC_CH_FUEL_VREF);
    return Result;
}
/*--------------------------------------------------------------------------*/
