
#include "Sys_Scheduler_Lib.h"
#include "Components.h"
//#include "CommonInterface.h"
#include "RTE.h"

void Sys_Pseudo_Real_Time_Tasks(void)
{
    Power_Management_Service();
}

void Sys_2ms_Tasks(void)
{
    Common_Input_Para();
    Sys_Status_Update_Service();
    Analog_Signal_Conv_Service();
}

void Sys_5ms_Tasks(void)
{
    Flash_Sync_Signal_Generation_Service();
}

void Sys_10ms_Tasks(void)
{
    Fuel_R_Cal(10u);
}

void Sys_20ms_Tasks(void)
{

}

void Sys_50ms_Tasks(void)
{

}

uint32_t g_u32LEDFlag = 0UL;
void Sys_100ms_Tasks(void)
{
    if (g_u32LEDFlag)
    {
        g_u32LEDFlag = 0UL;
        //RTE_GPIO_Set_Level(RTE_GPIO_ANALOG_PORT0_PIN15, 0x01U);
    }
    else
    {
        g_u32LEDFlag = 1UL;
        //RTE_GPIO_Set_Level(RTE_GPIO_ANALOG_PORT0_PIN15, 0x00U);
    }
    Fuel_Cal_Sevice(100u);
}

void Sys_Exact_50us_Tasks(void)
{
    static uint32_t task_1ms = 0u;
    GenDelay_Tick();
    ////DoCAN_Timer_Update(50u);
    task_1ms++;
    if ( task_1ms >=20U )   
    {
        task_1ms =0U;
        eeprom_1ms_timeCount( );
    }
}