#include "RTE_ADC.h"
#include "Analog_Signals.h"
#include "rh850_macros.h"

void RTE_ADC_Init(void)
{
    Analog_Signal_Conv_Init( );
}
/*--------------------------------------------------------------------------*/
uint32_t RTE_ForceRead_KL15_Voltage(void)
{
    uint32_t Result = 0x00ul;
    Result          = ADC_Conv_Single_Channel(ADC_CH_KL30_VOLTAGE);
    return Result;
}
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_Read_KL15_Voltage(void)
{
    uint32_t Result = 0x00ul;
    Result          = ADC_Read_Signal(ADC_CH_KL30_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_FUEL_Res(void)
{
  uint32_t Result = 0x00ul;
//    Result          = ADC_Read_Signal(ADC_CH_FUEL2_R);
   return  Result ;
}

uint32_t RTE_Read_FUEL_REF_Voltage(void)
{
    uint32_t Result = 0x00ul;
//    Result          = ADC_Read_Signal(ADC_CH_FUEL2_REF_V2);
    return Result;
}

/*--------------------------------------------------------------------------*/
uint8_t RTE_Read_KL15_Valid(void)
{
    uint8_t Result = 0x00u;
    Result         = ADC_Read_Signal_Valid(ADC_CH_KL30_VOLTAGE);
    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_FUEL_Valid(void)
{
    uint8_t Result = 0x00u;
  //  Result         = ADC_Read_Signal_Valid(ADC_CH_FUEL2_REF_V2);
    return Result;
}

/*--------------------------------------------------------------------------*/
