
#include "BackLight\BackLight.h"
#include "Components.h"
#include "Application.h"
#include "TrmerM\TrmerM.h"


#define BACK_LIGHT_DAY 200
uint8_t interact_PWM_Low_Duty = 0;
void BackLight_Process(void)
{
    if (Get_CAN_Power_State() != PKEY_ON && Get_CAN_Power_State() != KEY_OFF )
    {
        TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_DAY);
    }
    else
    {
        TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, 0);
    }
}

void Interact_Light_Process(void)
{
    if (Get_CAN_Power_State() != PKEY_ON && Get_CAN_Power_State() != KEY_OFF )
    {
        TimerM_PWM_set_duty(TIMERM_COUNTER0, TIMERM_CHD, interact_PWM_Low_Duty * 10);
    }
    else
    {
        TimerM_PWM_set_duty(TIMERM_COUNTER0, TIMERM_CHD, 0);
    }
}
