Sys_Task_List.c 1.41 KB
Newer Older
时昊's avatar
时昊 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

#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();
17
    AMT630H_Main();
时昊's avatar
时昊 committed
18 19 20 21 22 23 24 25 26 27 28 29 30 31
}

void Sys_5ms_Tasks(void)
{
    Flash_Sync_Signal_Generation_Service();
}

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

void Sys_20ms_Tasks(void)
{
32 33
    Data_Vehicle_Speed_Processing_Service();
    Data_Engine_Speed_Processing_Service();
时昊's avatar
时昊 committed
34 35 36 37 38 39 40 41
}

void Sys_50ms_Tasks(void)
{

}

uint32_t g_u32LEDFlag = 0UL;
42
//uint8_t ljsuartsend[2] = { 0x55, 0x66};
时昊's avatar
时昊 committed
43 44 45 46 47 48 49 50 51 52 53 54 55
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);
56 57
    RTE_GPIO_Set_Level(Blacklight_PWM, 1);
    //UART_Ch2_Send_Multiple_Byte(ljsuartsend, 2);
时昊's avatar
时昊 committed
58
}
59
static uint16_t task_2ms = 0u;
时昊's avatar
时昊 committed
60 61 62 63 64 65 66 67 68 69 70
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( );
    }
71 72 73 74 75 76 77

    task_2ms++;
    if (task_2ms >= 40)
    {
        task_2ms = 0;        
        AMT630H_Timer(2);
    }
时昊's avatar
时昊 committed
78
}