#include "RTE_PWM_OUT.h"
#include "TimerB.h"

void RTE_PWM_Init(void)
{
    TimerB_PWM_Init();
}

void RTE_PWM_Start(void)
{

}
void RTE_PWM_Stop(void)
{

}

/*指针背光,设置亮度*/
void RTE_PWM_Set_Point(uint16_t m_Cycle, uint16_t m_Duty)
{

}
/*指针背光,开启输出*/
void RTE_PWM_Point_Start(void)
{

}
/*指针背光,关闭输出*/
void RTE_PWM_Point_Stop(void)
{

}

/*表盘背光更新亮度*/
void RTE_PWM_Set_Panel(uint16_t m_Cycle, uint16_t m_Duty)
{

}
/*表盘背光关闭输出*/
void RTE_PWM_Panel_Stop(void)
{

}
/*表盘背光开启输出*/
void RTE_PWM_Panel_Start(void)
{

}


/*LCD设置背光*/
void RTE_PWM_Set_LCD(uint16_t m_Cycle, uint16_t m_Duty)
{

}
/*LCD关闭*/
void RTE_PWM_LCD_Stop(void)
{

}
/*LCD开启*/
void RTE_PWM_LCD_Start(void)
{

}

/*车速频率输出*/
void RTE_PWM_Set_Speed_Out(uint16_t m_Cycle, uint16_t m_Duty)
{
    uint32_t ActSetFreq = 0u;;
    uint16_t Fre_8_pulse = 0 ;

    Fre_8_pulse = m_Cycle ;
    Fre_8_pulse *= 25 ;
    Fre_8_pulse /= 8 ;

    /*A16-25  A17-8 A18-8*/
    /*车速1  25脉冲*/
    //ActSetFreq = TimerB_PWM_Channel_Fre_Set(TIMERB_2_CH10 , Fre_8_pulse , m_Duty);

    /*车速2  8脉冲*/
    //ActSetFreq = TimerB_PWM_Channel_Fre_Set(TIMERB_2_CH13 , m_Cycle , m_Duty);

    /*车速3  8脉冲*/
    //ActSetFreq = TimerB_PWM_Channel_Fre_Set(TIMERB_2_CH15 , m_Cycle , m_Duty);
}

/*转速频率输出*/
void RTE_PWM_Set_Tacho_Out(uint16_t m_Cycle, uint16_t m_Duty)
{
    uint32_t ActSetFreq;
    /*342  10.2  以4脉冲/发动机1转向A39端子输出 */
    ActSetFreq = TimerB_PWM_Channel_Fre_Set(TIMERB_0_CH7 , m_Cycle , m_Duty);
}
