Telltales_user.c 51.2 KB
Newer Older
hu's avatar
hu committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
//ZH修改2021年8月27日16:58:42

#include "GPIO.h"
#include "Telltales.h"
#include "Telltales_user.h"
#include "CAN_Communication_Matrix.h"
#include "Flash_synchronizer.h"
#include "EOL_Para.h"
#include "Sound_Scheduler.h"
#include "SEG_DISPLAY.h"
#include "Maintenance.h"
#include "Line_in.h"
#include "IS31FL3236.h"




TelltaleLRCtrlStruct TelltaleLRCtrl;

const LED_Attribute_st LED_Attribute[LED_Max] =
{
    /*  指示灯索引                             是否自检         外部信号自检       工作电源状态       自检开始时间    自检持续时间       指示灯点亮条件                           指示灯执行函数               */
    {   em_LED_INTER_DIFF_LOCK_T          , NoSelfCheck ,     ExterNalCheck ,  LED_IGN_ON_OFF ,       0u,         3000ul,     LED_INTER_DIFF_LOCK_T_Judgement          , LED_INTER_DIFF_LOCK_T_Execution            },
    {   em_LED_FOUR_MUL_FOUR_T            , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_FOUR_MUL_FOUR_T_Judgement            , LED_FOUR_MUL_FOUR_T_Execution              },
    {   em_LED_EXH_BRAKE_T                , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_EXH_BRAKE_T_Judgement                , LED_EXH_BRAKE_T_Execution                  },
    {   em_LED_QOS_GLOW_T                 ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_QOS_GLOW_T_Judgement                 , LED_QOS_GLOW_T_Execution                   },
    {   em_LED_HI_BEAM_T                  , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_HI_BEAM_T_Judgement                  , LED_HI_BEAM_T_Execution                    },
    {   em_LED_Rr_FOG_LAMP_T              , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_Rr_FOG_LAMP_T_Judgement              , LED_Rr_FOG_LAMP_T_Execution                },
    {   em_LED_MIL_T                      ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_MIL_T_Judgement                      , LED_MIL_T_Execution                        },
    {   em_LED_SVS_T                      ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_SVS_T_Judgement                      , LED_SVS_T_Execution                        },
hu's avatar
hu committed
31
    {   em_LED_H_S_A__T                   , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_H_S_A_T_Judgement                    , LED_H_S_A_T_Execution                     },
hu's avatar
hu committed
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
    {   em_LED_RETARDER_T                 ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_RETARDER_T_Judgement                 , LED_RETARDER_T_Execution                   },
    {   em_LED_AUTO_LEVELING_T            , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_AUTO_LEVELING_T_Judgement            , LED_AUTO_LEVELING_T_Execution              },
    {   em_LED_ROWS_L                     , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_ROWS_L_Judgement                     , LED_ROWS_L_Execution                       },
    {   em_LED_BSM_OFF_L                  , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_BSM_OFF_L_Judgement                  , LED_BSM_OFF_L_Execution                    },
    {   em_LED_AEBS_OFF_L                 , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_AEBS_OFF_L_Judgement                 , LED_AEBS_OFF_L_Execution                   },
    {   em_LED_LDWS_L                     , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_LDWS_L_Judgement                     , LED_LDWS_L_Execution                       },
    {   em_LED_SRS_L                      , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_SRS_L_Judgement                      , LED_SRS_L_Execution                        },
    {   em_LED_ENG_OIL_L                  ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_ENG_OIL_L_Judgement                  , LED_ENG_OIL_L_Execution                    },
    {   em_LED_CHARG_L                    ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_CHARG_L_Judgement                    , LED_CHARG_L_Execution                      },
    {   em_LED_SEAT_BELT_L                ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_SEAT_BELT_L_Judgement                , LED_SEAT_BELT_L_Execution                  },
    {   em_LED_RR_DIFF_LOCK_L             ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_RR_DIFF_LOCK_L_Judgement             , LED_RR_DIFF_LOCK_L_Execution               },
    {   em_LED_TPMS_L                     , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_TPMS_L_Judgement                     , LED_TPMS_L_Execution                       },
    {   em_LED_ASR_or_EVSC_OFF_L          , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_ASR_or_EVSC_OFF_L_Judgement          , LED_ASR_or_EVSC_OFF_L_Execution            },
    {   em_LED_EVSC_L                     , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_EVSC_L_Judgement                     , LED_EVSC_L_Execution                       },
    {   em_LED_eco_stop_OFF_L             , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_eco_stop_OFF_L_Judgement             , LED_eco_stop_OFF_L_Execution               },
    {   em_LED_AMT_L                      , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_AMT_L_Judgement                      , LED_AMT_L_Execution                        },
    {   em_LED_WEAR_IND_L                 , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_WEAR_IND_L_Judgement                 , LED_WEAR_IND_L_Execution                   },
    {   em_LED_TRAILER_BRAKE_R            ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_TRAILER_BRAKE_R_Judgement            , LED_TRAILER_BRAKE_R_Execution              },
    {   em_LED_BRAKE_AIR_or_EBS_YELLOW_R  , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_BRAKE_AIR_or_EBS_YELLOW_R_Judgement  , LED_BRAKE_AIR_or_EBS_YELLOW_R_Execution    },
    {   em_LED_ACC_AIR_R                  , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_ACC_AIR_R_Judgement                  , LED_ACC_AIR_R_Execution                    },
    {   em_LED_ABS_R                      , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_ABS_R_Judgement                      , LED_ABS_R_Execution                        },
    {   em_LED_PARK_BRAKE_R               ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_PARK_BRAKE_R_Judgement               , LED_PARK_BRAKE_R_Execution                 },
    {   em_LED_BRAKE_AIR_or_EBS_RED_R     , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_BRAKE_AIR_or_EBS_RED_R_Judgement     , LED_BRAKE_AIR_or_EBS_RED_R_Execution       },
    {   em_LED_BRAKE_LOCK_R               , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_BRAKE_LOCK_R_Judgement               , LED_BRAKE_LOCK_R_Execution                 },
    {   em_LED_AIR_SUS_R                  ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_AIR_SUS_R_Judgement                  , LED_AIR_SUS_R_Execution                    },
    {   em_LED_TRAILER_ABS_U              ,   SelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_TRAILER_ABS_U_Judgement              , LED_TRAILER_ABS_U_Execution                },
    {   em_LED_WORKING_LAMP_U             , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_WORKING_LAMP_U_Judgement             , LED_WORKING_LAMP_U_Execution               },
    {   em_LED_TRAILER_ABS_INFO_U         , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_TRAILER_ABS_INFO_U_Judgement         , LED_TRAILER_ABS_INFO_U_Execution           },
hu's avatar
hu committed
60 61
    {   em_LED_TEMP                       , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_Temp_Judgement                       , LED_Temp_Execution                         },
    {   em_LED_FUEL                       , NoSelfCheck ,   NoExterNalCheck ,  LED_IGN_ON     ,       0u,         3000ul,     LED_Fuel_Judgement                       , LED_Fuel_Execution                         },
hu's avatar
hu committed
62 63 64 65 66 67 68 69 70 71 72 73
};

/*must put into 10ms task*/

void Telltales_Left_Right_KL30_Init(void);

void Telltales_Left_Right_KL30_Init(void)
{
    TelltaleLRCtrl.LastRight = 0u;
    TelltaleLRCtrl.LastLeft = 0u;
    TelltaleLRCtrl.Delay = 0u;
}
hu's avatar
hu committed
74

hu's avatar
hu committed
75
/******************************************************************************
hu's avatar
hu committed
76
  T3 L16 U1 U4 U5无灯   左右转向单独 气压1 气压2 指示灯是背光
hu's avatar
hu committed
77
 ******************************************************************************/
hu's avatar
hu committed
78

hu's avatar
hu committed
79 80 81 82
/******************************************************************************
  T0 左转向   T13 右转向
  信号接口:
  信号定义:
hu's avatar
hu committed
83
  输出信号:
hu's avatar
hu committed
84
 ******************************************************************************/
hu's avatar
hu committed
85 86 87 88 89 90 91 92 93 94 95 96 97 98
void Telltales_Left_Right_Management_Service(void) /*10ms*/
{
    uint8_t Edge;
    uint8_t RIGHT_ST = 0x00u;
    uint8_t LEFT_ST = 0x00u;

    RIGHT_ST = Line_In_Get_Status(LINE_IN_TURN_R);
    LEFT_ST = Line_In_Get_Status(LINE_IN_TURN_L);

    Edge = 0xffu ;

    if (LEFT_ST == 1u)//左转向
    {
        SEG_LED_TURN_LEFT(7);//左转向断码屏开
99
        IS31_CHIP0_CHANNEL36 = 0x3Fu;
hu's avatar
hu committed
100 101 102 103 104 105
    }
    else
    {
        SEG_LED_TURN_LEFT(0);
        IS31_CHIP0_CHANNEL36 = 0x00u;
    }
106
    if (TelltaleLRCtrl.LastLeft != LEFT_ST)
hu's avatar
hu committed
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
    {
        TelltaleLRCtrl.LastLeft = LEFT_ST;
        Edge = LEFT_ST;
    }

    if (RIGHT_ST == 1u)//右转向
    {
        SEG_LED_TURN_RIGHT(7);//右转向断码屏开
        IS31_CHIP0_CHANNEL24 = 0x3Fu;
    }
    else
    {
        SEG_LED_TURN_RIGHT(0);
        IS31_CHIP0_CHANNEL24 = 0x00u;
    }

    if (TelltaleLRCtrl.LastRight != RIGHT_ST)
    {
        TelltaleLRCtrl.LastRight = RIGHT_ST;
        Edge = RIGHT_ST;
    }

    if (TelltaleLRCtrl.Delay > 0u)
    {
        TelltaleLRCtrl.Delay--;
    }
    else
    {
        if (Edge != 0xFFu)
        {
            if (Edge)
            {
                Sound_Request(SND_TICK, 1u);
            }
            else
            {
                Sound_Request(SND_TOCK, 1u);
            }

            TelltaleLRCtrl.Delay = 10u; /*200ms内不允许重复播放声音*/
        }
        else
        {
            Sound_Delete(SND_TICK);
            Sound_Delete(SND_TOCK);
        }
    }
}

156
#if 0
hu's avatar
hu committed
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210
/*************************************

测试用

**************************************/
void Test_LED_AllLight(void)
{
    LED_INTER_DIFF_LOCK_T_Execution(LED_ON_State);
    LED_FOUR_MUL_FOUR_T_Execution(LED_ON_State);
    LED_EXH_BRAKE_T_Execution(LED_ON_State);
    LED_QOS_GLOW_T_Execution(LED_ON_State);
    LED_HI_BEAM_T_Execution(LED_ON_State);
    LED_Rr_FOG_LAMP_T_Execution(LED_ON_State);
    LED_MIL_T_Execution(LED_ON_State);
    LED_SVS_T_Execution(LED_ON_State);
    LED_H_S_A__T_Execution(LED_ON_State);
    LED_RETARDER_T_Execution(LED_ON_State);
    LED_AUTO_LEVELING_T_Execution(LED_ON_State);
    LED_ROWS_L_Execution(LED_ON_State);
    LED_BSM_OFF_L_Execution(LED_ON_State);
    LED_AEBS_OFF_L_Execution(LED_ON_State);
    LED_LDWS_L_Execution(LED_ON_State);
    LED_SRS_L_Execution(LED_ON_State);
    LED_ENG_OIL_L_Execution(LED_ON_State);
    LED_CHARG_L_Execution(LED_ON_State);
    LED_SEAT_BELT_L_Execution(LED_ON_State);
    LED_RR_DIFF_LOCK_L_Execution(LED_ON_State);
    LED_TPMS_L_Execution(LED_ON_State);
    LED_ASR_or_EVSC_OFF_L_Execution(LED_ON_State);
    LED_EVSC_L_Execution(LED_ON_State);
    LED_eco_stop_OFF_L_Execution(LED_ON_State);
    LED_AMT_L_Execution(LED_ON_State);
    LED_WEAR_IND_L_Execution(LED_ON_State);
    LED_TRAILER_BRAKE_R_Execution(LED_ON_State);
    LED_BRAKE_AIR_or_EBS_YELLOW_R_Execution(LED_ON_State);
    LED_ACC_AIR_R_Execution(LED_ON_State);
    LED_ABS_R_Execution(LED_ON_State);
    LED_PARK_BRAKE_R_Execution(LED_ON_State);
    LED_BRAKE_AIR_or_EBS_RED_R_Execution(LED_ON_State);
    LED_BRAKE_LOCK_R_Execution(LED_ON_State);
    LED_AIR_SUS_R_Execution(LED_ON_State);
    LED_TRAILER_ABS_U_Execution(LED_ON_State);
    LED_WORKING_LAMP_U_Execution(LED_ON_State);
    LED_TRAILER_ABS_INFO_U_Execution(LED_ON_State);
}

#endif


/*ZH:*/

#define XXXX  0u
#define LED_BRIGHTNESS 0xff

hu's avatar
hu committed
211 212
uint8_t HYQ = 0U;

213 214 215 216
/******************************************************************************
  T1  INTER DIFF LOCK
  信号接口:
  信号定义:
hu's avatar
hu committed
217
  输出信号:
218
 ******************************************************************************/
hu's avatar
hu committed
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236
uint8_t LED_INTER_DIFF_LOCK_T_Judgement(void)
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
    m_Condition1 = (uint8_t)XXXX;

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}

237 238
void LED_INTER_DIFF_LOCK_T_Execution(uint8_t led_status)
{
hu's avatar
hu committed
239
    RR_DIFF_LOCK_MCU = led_status;
240 241 242 243 244 245 246 247 248 249 250 251

    if (led_status == 1)
    {
        SEG_LED_INTER_DIFF_LOCK_T(7);
    }
    else
    {
        SEG_LED_INTER_DIFF_LOCK_T(0);
    }
}

/******************************************************************************
hu's avatar
hu committed
252
  T2
253 254
  信号接口:
  信号定义:
hu's avatar
hu committed
255
  输出信号:
256
 ******************************************************************************/
hu's avatar
hu committed
257
uint8_t LED_FOUR_MUL_FOUR_T_Judgement(void)
258 259 260
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
261
    m_Condition1 = (uint8_t)XXXX;
262 263 264 265 266 267 268 269 270 271 272 273

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
274
void LED_FOUR_MUL_FOUR_T_Execution(uint8_t led_status)
275
{
hu's avatar
hu committed
276 277 278 279 280 281 282 283
    if (led_status == 1)
    {
        IS31_CHIP0_CHANNEL35 = LED_BRIGHTNESS;
    }
    else
    {
        IS31_CHIP0_CHANNEL35 = 0x00;
    }
284 285 286

    if (led_status == 1)
    {
hu's avatar
hu committed
287
        SEG_LED_FOUR_MUL_FOUR_T(7);
288 289 290
    }
    else
    {
hu's avatar
hu committed
291
        SEG_LED_FOUR_MUL_FOUR_T(0);
292 293 294 295
    }
}

/******************************************************************************
hu's avatar
hu committed
296
  T4 EXH BRAKE
297 298
  信号接口:
  信号定义:
hu's avatar
hu committed
299
  输出信号:
300
 ******************************************************************************/
hu's avatar
hu committed
301 302 303 304
uint8_t LED_EXH_BRAKE_T_Judgement(void)
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
305

hu's avatar
hu committed
306
    m_Condition1 = (uint8_t)Get_ID_18FF2300_Sig_Exh_Lamp();
307

hu's avatar
hu committed
308
    if (m_Condition1 == 0x01u)
hu's avatar
hu committed
309 310 311 312 313 314 315
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }
316

hu's avatar
hu committed
317 318 319 320 321 322 323 324 325 326 327 328
    return u8Result;
}
void LED_EXH_BRAKE_T_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
        IS31_CHIP0_CHANNEL34 = LED_BRIGHTNESS;
    }
    else
    {
        IS31_CHIP0_CHANNEL34 = 0x00;
    }
329

hu's avatar
hu committed
330 331 332 333 334 335 336 337 338
    if (led_status == 1)
    {
        SEG_LED_EXH_BRAKE_T(7);
    }
    else
    {
        SEG_LED_EXH_BRAKE_T(0);
    }
}
339 340

/******************************************************************************
hu's avatar
hu committed
341
  T5 QOS(GLOW)
342 343
  信号接口:
  信号定义:
hu's avatar
hu committed
344
  输出信号:
345
 ******************************************************************************/
hu's avatar
hu committed
346
uint8_t LED_QOS_GLOW_T_Judgement(void)
347 348 349
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
350
    m_Condition1 = (uint8_t)Get_ID_18FF2300_Sig_Glow_Lamp();
351 352 353 354 355 356 357 358 359 360 361 362

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
363
void LED_QOS_GLOW_T_Execution(uint8_t led_status)
364
{
hu's avatar
hu committed
365 366 367 368 369 370 371 372
    if (led_status == 1)
    {
        IS31_CHIP0_CHANNEL33 = LED_BRIGHTNESS;
    }
    else
    {
        IS31_CHIP0_CHANNEL33 = 0x00;
    }
373 374 375

    if (led_status == 1)
    {
hu's avatar
hu committed
376
        SEG_LED_QOS_GLOW_T(7);
377 378 379
    }
    else
    {
hu's avatar
hu committed
380
        SEG_LED_QOS_GLOW_T(0);
381 382 383
    }
}
/******************************************************************************
hu's avatar
hu committed
384
  T6 HI BEAM
385 386 387 388
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
389
uint8_t LED_HI_BEAM_T_Judgement(void)
hu's avatar
hu committed
390 391 392
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
393
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_HI_BEAM);
hu's avatar
hu committed
394 395 396 397 398 399 400 401 402 403 404 405

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425
void LED_HI_BEAM_T_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
        IS31_CHIP0_CHANNEL32 = LED_BRIGHTNESS;
    }
    else
    {
        IS31_CHIP0_CHANNEL32 = 0x00;
    }

    if (led_status == 1)
    {
        SEG_LED_HI_BEAM_T(7);
    }
    else
    {
        SEG_LED_HI_BEAM_T(0);
    }
}
hu's avatar
hu committed
426

hu's avatar
hu committed
427 428 429 430 431 432 433
/******************************************************************************
  T7 Rr FOG LAMP
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_Rr_FOG_LAMP_T_Judgement(void)
hu's avatar
hu committed
434 435 436
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
437
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_Rr_FOG_LAMP);
hu's avatar
hu committed
438

hu's avatar
hu committed
439
    if (m_Condition1 == 1u)
hu's avatar
hu committed
440 441 442 443 444 445 446 447 448 449
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
450 451 452
void LED_Rr_FOG_LAMP_T_Execution(uint8_t led_status)
{
    T7_LED_OUT = led_status;
hu's avatar
hu committed
453

hu's avatar
hu committed
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470
    if (led_status == 1)
    {
        SEG_LED_Rr_FOG_LAMP_T(7);
    }
    else
    {
        SEG_LED_Rr_FOG_LAMP_T(0);
    }
}

/******************************************************************************
  T8 MIL
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_MIL_T_Judgement(void)
hu's avatar
hu committed
471 472 473
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
474
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_MIL);
hu's avatar
hu committed
475 476 477

    if (m_Condition1 == 1u)
    {
hu's avatar
hu committed
478
        u8Result = 1u;
hu's avatar
hu committed
479 480 481
    }
    else
    {
hu's avatar
hu committed
482
        u8Result = 0u;
hu's avatar
hu committed
483 484 485 486
    }

    return u8Result;
}
hu's avatar
hu committed
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506
void LED_MIL_T_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
        IS31_CHIP0_CHANNEL31 = LED_BRIGHTNESS;
    }
    else
    {
        IS31_CHIP0_CHANNEL31 = 0x00;
    }

    if (led_status == 1)
    {
        SEG_LED_MIL_T(7);
    }
    else
    {
        SEG_LED_MIL_T(0);
    }
}
hu's avatar
hu committed
507

hu's avatar
hu committed
508 509 510 511 512 513 514
/******************************************************************************
  T9 SVS
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_SVS_T_Judgement(void)
hu's avatar
hu committed
515 516 517
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
518
    m_Condition1 = (uint8_t)Get_ID_18FED900_Sig_SVS_Lamp_Status();
hu's avatar
hu committed
519 520 521 522 523 524 525 526 527 528 529 530

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550
void LED_SVS_T_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
        IS31_CHIP0_CHANNEL30 = LED_BRIGHTNESS;
    }
    else
    {
        IS31_CHIP0_CHANNEL30 = 0x00;
    }

    if (led_status == 1)
    {
        SEG_LED_SVS_T(7);
    }
    else
    {
        SEG_LED_SVS_T(0);
    }
}
hu's avatar
hu committed
551

hu's avatar
hu committed
552 553 554 555 556 557 558
/******************************************************************************
  T10 H.S.A
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_H_S_A_T_Judgement(void)
hu's avatar
hu committed
559 560 561
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
562
    m_Condition1 = (uint8_t)XXXX;
hu's avatar
hu committed
563 564 565 566 567 568 569 570 571 572 573 574

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591
void LED_H_S_A_T_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
        IS31_CHIP0_CHANNEL28 = LED_BRIGHTNESS; // 绿灯 亮
        IS31_CHIP0_CHANNEL29 = 0x00; // 黄灯 灭
    }
    else if (led_status == 2)
    {
        IS31_CHIP0_CHANNEL28 = 0x00; // 绿灯 灭
        IS31_CHIP0_CHANNEL29 = LED_BRIGHTNESS; // 黄灯 亮
    }
    else
    {
        IS31_CHIP0_CHANNEL28 = 0x00; // 绿灯 灭
        IS31_CHIP0_CHANNEL29 = 0x00; // 黄灯 灭
    }
hu's avatar
hu committed
592

hu's avatar
hu committed
593 594 595 596 597 598 599 600 601
    if ((led_status == 1) || (led_status == 2))
    {
        SEG_LED_H_S_A_T(7);
    }
    else
    {
        SEG_LED_H_S_A_T(0);
    }
}
hu's avatar
hu committed
602

hu's avatar
hu committed
603 604 605 606 607 608 609
/******************************************************************************
  T11 RETARDER
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_RETARDER_T_Judgement(void)
hu's avatar
hu committed
610 611 612
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
613 614

    m_Condition1 = (uint8_t)Get_ID_18FF5510_Sig_Intarder_Pilot_Lamp_State();
hu's avatar
hu committed
615

hu's avatar
hu committed
616
    if (K_Line_Set.K_Line_LID41 == 0x13u)
hu's avatar
hu committed
617
    {
hu's avatar
hu committed
618
        if (m_Condition1 == 1u)
hu's avatar
hu committed
619
        {
hu's avatar
hu committed
620
            u8Result = 1u;
hu's avatar
hu committed
621
        }
hu's avatar
hu committed
622
        else if (m_Condition1 == 2u)
hu's avatar
hu committed
623
        {
hu's avatar
hu committed
624 625 626 627 628 629 630 631
            if (FLASH_SYNC_1Hz == 1u)
            {
                u8Result = 2u;
            }
            else
            {
                u8Result = 0u;
            }
hu's avatar
hu committed
632
        }
hu's avatar
hu committed
633 634 635
    }
    else
    {
hu's avatar
hu committed
636
        u8Result = 0u;
hu's avatar
hu committed
637 638 639 640
    }

    return u8Result;
}
hu's avatar
hu committed
641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657
void LED_RETARDER_T_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
        IS31_CHIP0_CHANNEL27 = LED_BRIGHTNESS; // 绿灯 亮
        IS31_CHIP0_CHANNEL26 = 0x00; // 黄灯 灭
    }
    else if (led_status == 2)
    {
        IS31_CHIP0_CHANNEL27 = 0x00; // 绿灯 灭
        IS31_CHIP0_CHANNEL26 = LED_BRIGHTNESS; // 黄灯 亮
    }
    else
    {
        IS31_CHIP0_CHANNEL27 = 0x00; // 绿灯 灭
        IS31_CHIP0_CHANNEL26 = 0x00; // 黄灯 灭
    }
hu's avatar
hu committed
658

hu's avatar
hu committed
659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675
    if ((led_status == 1) || (led_status == 2))
    {
        SEG_LED_RETARDER_T(7);
    }
    else
    {
        SEG_LED_RETARDER_T(0);
    }
}

/******************************************************************************
  T12 AUTO LEVELING
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_AUTO_LEVELING_T_Judgement(void)
hu's avatar
hu committed
676 677 678
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
679
    m_Condition1 = (uint8_t)XXXX;
hu's avatar
hu committed
680 681 682 683 684 685 686 687 688 689 690 691 692

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}

hu's avatar
hu committed
693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714
void LED_AUTO_LEVELING_T_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
        IS31_CHIP0_CHANNEL25 = LED_BRIGHTNESS;
    }
    else
    {
        IS31_CHIP0_CHANNEL25 = 0x00;
    }

    if (led_status == 1)
    {
        SEG_LED_AUTO_LEVELING_T(7);
    }
    else
    {
        SEG_LED_AUTO_LEVELING_T(0);
    }
}

/******************************************************************************
hu's avatar
hu committed
715
  L1 ROWS
hu's avatar
hu committed
716 717 718 719
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
720
uint8_t LED_ROWS_L_Judgement(void)
hu's avatar
hu committed
721 722 723
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
724
    m_Condition1 = (uint8_t)XXXX;
hu's avatar
hu committed
725 726 727 728 729 730 731 732 733 734 735 736

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
737
void LED_ROWS_L_Execution(uint8_t led_status)
hu's avatar
hu committed
738
{
hu's avatar
hu committed
739 740 741 742 743 744 745 746
    if (led_status == 1)
    {
        IS31_CHIP0_CHANNEL01 = LED_BRIGHTNESS;
    }
    else
    {
        IS31_CHIP0_CHANNEL01 = 0x00;
    }
hu's avatar
hu committed
747

hu's avatar
hu committed
748
    if (led_status == 1)
hu's avatar
hu committed
749
    {
hu's avatar
hu committed
750
        SEG_LED_ROWS_L(7);
hu's avatar
hu committed
751
    }
hu's avatar
hu committed
752
    else
hu's avatar
hu committed
753
    {
hu's avatar
hu committed
754
        SEG_LED_ROWS_L(0);
hu's avatar
hu committed
755 756 757 758
    }
}

/******************************************************************************
hu's avatar
hu committed
759
  L2 BSM OFF
hu's avatar
hu committed
760 761 762 763
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
764
uint8_t LED_BSM_OFF_L_Judgement(void)
hu's avatar
hu committed
765 766 767
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
768
    m_Condition1 = (uint8_t)XXXX;
hu's avatar
hu committed
769 770 771 772

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
hu's avatar
hu committed
773 774 775 776 777
    }
    else
    {
        u8Result = 0u;
    }
778

hu's avatar
hu committed
779 780
    return u8Result;
}
hu's avatar
hu committed
781
void LED_BSM_OFF_L_Execution(uint8_t led_status)
hu's avatar
hu committed
782
{
hu's avatar
hu committed
783 784 785 786 787 788 789 790
    if (led_status == 1)
    {
        IS31_CHIP0_CHANNEL02 = LED_BRIGHTNESS;
    }
    else
    {
        IS31_CHIP0_CHANNEL02 = 0x00;
    }
hu's avatar
hu committed
791

hu's avatar
hu committed
792
    if (led_status == 1)
hu's avatar
hu committed
793
    {
hu's avatar
hu committed
794
        SEG_LED_BSM_OFF_L(7);
hu's avatar
hu committed
795 796 797
    }
    else
    {
hu's avatar
hu committed
798
        SEG_LED_BSM_OFF_L(0);
hu's avatar
hu committed
799 800 801
    }
}

hu's avatar
hu committed
802
/******************************************************************************
hu's avatar
hu committed
803
  L3 AEBS OFF
hu's avatar
hu committed
804 805 806 807
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
808
uint8_t LED_AEBS_OFF_L_Judgement(void)
hu's avatar
hu committed
809 810 811
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
812 813
    uint8_t m_Condition2 = 0u;
    uint8_t m_Condition3 = 0u;
hu's avatar
hu committed
814

hu's avatar
hu committed
815 816 817 818
    m_Condition1 = (uint8_t)Get_ID_CF02F2A_Sig_Advanced_Emerg_Braking_Sys_Sta();
    m_Condition2 = (uint8_t)Get_ID_CF02FA1_Sig_Advanced_Emerg_Braking_Sys_Sta();
    m_Condition3 = (uint8_t)Get_ID_CF02FA0_Sig_Advanced_Emerg_Braking_Sys_Sta();

hu's avatar
hu committed
819
    if (K_Line_Set.K_Line_LID28 == 0x01u)
hu's avatar
hu committed
820
    {
hu's avatar
hu committed
821 822 823 824 825 826 827 828
        if ((m_Condition1 == 2u) || (m_Condition2 == 2u) || (m_Condition3 == 2u))
        {
            u8Result = 1u;
        }
        else if ((m_Condition1 == 14u) || (m_Condition2 == 14u) || (m_Condition3 == 14u))
        {
            u8Result = FLASH_SYNC_1Hz;
        }
hu's avatar
hu committed
829
    }
hu's avatar
hu committed
830 831 832 833 834 835 836
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
837
void LED_AEBS_OFF_L_Execution(uint8_t led_status)
hu's avatar
hu committed
838
{
hu's avatar
hu committed
839
    if (led_status == 1)
hu's avatar
hu committed
840
    {
hu's avatar
hu committed
841
        IS31_CHIP0_CHANNEL03 = LED_BRIGHTNESS;
hu's avatar
hu committed
842 843 844
    }
    else
    {
hu's avatar
hu committed
845
        IS31_CHIP0_CHANNEL03 = 0x00;
hu's avatar
hu committed
846 847
    }

hu's avatar
hu committed
848 849 850 851 852 853 854 855
    if (led_status == 1)
    {
        SEG_LED_AEBS_OFF_L(7);
    }
    else
    {
        SEG_LED_AEBS_OFF_L(0);
    }
hu's avatar
hu committed
856 857
}

hu's avatar
hu committed
858
/******************************************************************************
hu's avatar
hu committed
859
  L4 LDWS
hu's avatar
hu committed
860 861 862 863 864
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_LDWS_L_Judgement(void)
hu's avatar
hu committed
865 866 867 868
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
    uint8_t m_Condition2 = 0u;
hu's avatar
hu committed
869 870
    uint8_t CanStatus1 = 0u;
    uint8_t CanStatus2 = 0u;
hu's avatar
hu committed
871

hu's avatar
hu committed
872 873
    m_Condition1 = (uint8_t)Get_ID_18FE5BE8_Sig_Lane_Departure_Warning_Sys_Sta();
    m_Condition2 = (uint8_t)Get_ID_18FECAE8_Sig_Amber_Warning_Lamp_Status();
hu's avatar
hu committed
874

hu's avatar
hu committed
875 876 877 878
    CanStatus1 = CAN_MSG_Status(ID_CanMsg18FE5BE8_Msg_Count);
    CanStatus2 = CAN_MSG_Status(ID_CanMsg18FECAE8_Msg_Count);

    if (K_Line_Set.K_Line_LID27 == 0x01u)
hu's avatar
hu committed
879
    {
hu's avatar
hu committed
880 881 882 883 884 885 886 887 888 889 890 891 892
        /*LDWS与FCW同时掉线闪烁*/
        if ((CanStatus1 == CAN_SIG_LOST) && (CanStatus2 == CAN_SIG_LOST))
        {
            u8Result = FLASH_SYNC_1Hz;
        }
        else if ((m_Condition1 == 0x02u) || (m_Condition2 == 0x01u))
        {
            u8Result = 1u;
        }
        else if ((m_Condition1 == 0x00u) || (m_Condition1 == 0x05u) || (m_Condition1 == 0x0Eu))
        {
            u8Result = FLASH_SYNC_1Hz;
        }
hu's avatar
hu committed
893 894 895 896 897 898 899 900
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
901
void LED_LDWS_L_Execution(uint8_t led_status)
hu's avatar
hu committed
902
{
hu's avatar
hu committed
903
    if (led_status == 1)
hu's avatar
hu committed
904
    {
hu's avatar
hu committed
905
        IS31_CHIP0_CHANNEL04 = LED_BRIGHTNESS;
hu's avatar
hu committed
906
    }
hu's avatar
hu committed
907
    else
hu's avatar
hu committed
908
    {
hu's avatar
hu committed
909 910 911 912 913 914
        IS31_CHIP0_CHANNEL04 = 0x00;
    }

    if (led_status == 1)
    {
        SEG_LED_LDWS_L(7);
hu's avatar
hu committed
915 916 917
    }
    else
    {
hu's avatar
hu committed
918
        SEG_LED_LDWS_L(0);
hu's avatar
hu committed
919 920 921
    }
}

hu's avatar
hu committed
922
/******************************************************************************
hu's avatar
hu committed
923
  L5 SRS
hu's avatar
hu committed
924 925 926 927
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944
uint8_t LED_SRS_L_Judgement(void)
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
    m_Condition1 = (uint8_t)XXXX;

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964
void LED_SRS_L_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
        IS31_CHIP0_CHANNEL20 = LED_BRIGHTNESS;
    }
    else
    {
        IS31_CHIP0_CHANNEL20 = 0x00;
    }

    if (led_status == 1)
    {
        SEG_LED_SRS_L(7);
    }
    else
    {
        SEG_LED_SRS_L(0);
    }
}
hu's avatar
hu committed
965

hu's avatar
hu committed
966
/******************************************************************************
hu's avatar
hu committed
967
  L6 ENG OIL
hu's avatar
hu committed
968 969 970 971 972
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_ENG_OIL_L_Judgement(void)
hu's avatar
hu committed
973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_ENG_OIL);

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
989 990 991 992 993 994 995 996 997 998
void LED_ENG_OIL_L_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
        IS31_CHIP0_CHANNEL21 = LED_BRIGHTNESS;
    }
    else
    {
        IS31_CHIP0_CHANNEL21 = 0x00;
    }
hu's avatar
hu committed
999

hu's avatar
hu committed
1000 1001 1002 1003 1004 1005 1006 1007 1008 1009
    if (led_status == 1)
    {
        SEG_LED_ENG_OIL_L(7);
    }
    else
    {
        SEG_LED_ENG_OIL_L(0);
    }
}
/******************************************************************************
hu's avatar
hu committed
1010
  L7 CHARG
hu's avatar
hu committed
1011 1012 1013 1014 1015
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_CHARG_L_Judgement(void)
hu's avatar
hu committed
1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_CHARGE);

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051
void LED_CHARG_L_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
        IS31_CHIP0_CHANNEL22 = LED_BRIGHTNESS;
    }
    else
    {
        IS31_CHIP0_CHANNEL22 = 0x00;
    }

    if (led_status == 1)
    {
        SEG_LED_CHARG_L(7);
    }
    else
    {
        SEG_LED_CHARG_L(0);
    }
}
hu's avatar
hu committed
1052

hu's avatar
hu committed
1053
/******************************************************************************
hu's avatar
hu committed
1054
  L8 SEAT BELT
hu's avatar
hu committed
1055 1056 1057 1058 1059
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_SEAT_BELT_L_Judgement(void)
hu's avatar
hu committed
1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_SEAT_BELT);

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1076 1077 1078 1079 1080 1081 1082 1083 1084 1085
void LED_SEAT_BELT_L_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
        IS31_CHIP0_CHANNEL23 = LED_BRIGHTNESS;
    }
    else
    {
        IS31_CHIP0_CHANNEL23 = 0x00;
    }
hu's avatar
hu committed
1086

hu's avatar
hu committed
1087 1088 1089 1090 1091 1092 1093 1094 1095 1096
    if (led_status == 1)
    {
        SEG_LED_SEAT_BELT_L(7);
    }
    else
    {
        SEG_LED_SEAT_BELT_L(0);
    }
}
/******************************************************************************
hu's avatar
hu committed
1097
  L9 RR DIFF LOCK
hu's avatar
hu committed
1098 1099 1100 1101 1102
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_RR_DIFF_LOCK_L_Judgement(void)
hu's avatar
hu committed
1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_RR_DIFF_LOCK);

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138
void LED_RR_DIFF_LOCK_L_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
        IS31_CHIP0_CHANNEL16 = LED_BRIGHTNESS;
    }
    else
    {
        IS31_CHIP0_CHANNEL16 = 0x00;
    }

    if (led_status == 1)
    {
        SEG_LED_RR_DIFF_LOCK_L(7);
    }
    else
    {
        SEG_LED_RR_DIFF_LOCK_L(0);
    }
}
hu's avatar
hu committed
1139

hu's avatar
hu committed
1140
/******************************************************************************
hu's avatar
hu committed
1141
  L10 TPMS
hu's avatar
hu committed
1142 1143 1144 1145 1146
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_TPMS_L_Judgement(void)
hu's avatar
hu committed
1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
    uint8_t m_Condition2 = 0u;
    uint8_t m_Condition3 = 0u;
    uint8_t m_Condition4 = 0u;
    uint8_t m_Condition5 = 0u;

    m_Condition1 = (uint8_t)Get_ID_18011733_Sig_Low_Presure_Alarm();
    m_Condition2 = (uint8_t)Get_ID_18011733_Sig_High_Presure_Alarm();
    m_Condition3 = (uint8_t)Get_ID_18011733_Sig_High_Temperature_Alarm();
    m_Condition4 = (uint8_t)Get_ID_18011733_Sig_No_signal_Alarm();
    m_Condition5 = (uint8_t)Get_ID_18011733_Sig_Sensor_fault_information();

hu's avatar
hu committed
1161

hu's avatar
hu committed
1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176
    if ((m_Condition1 == 1u) || (m_Condition2 == 1u) || (m_Condition3 == 1u))
    {
        u8Result = 1u;
    }
    else if ((m_Condition4 == 1u) || (m_Condition5 == 7u) || (m_Condition5 == 8u) || (m_Condition5 == 9u))
    {
        u8Result = FLASH_SYNC_1Hz;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1177 1178 1179 1180 1181 1182 1183 1184 1185 1186
void LED_TPMS_L_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
        IS31_CHIP0_CHANNEL17 = LED_BRIGHTNESS;
    }
    else
    {
        IS31_CHIP0_CHANNEL17 = 0x00;
    }
hu's avatar
hu committed
1187

hu's avatar
hu committed
1188 1189 1190 1191 1192 1193 1194 1195 1196 1197
    if (led_status == 1)
    {
        SEG_LED_TPMS_L(7);
    }
    else
    {
        SEG_LED_TPMS_L(0);
    }
}
/******************************************************************************
hu's avatar
hu committed
1198
  L11 ASR/EVSC OFF
hu's avatar
hu committed
1199 1200 1201 1202 1203
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_ASR_or_EVSC_OFF_L_Judgement(void)
hu's avatar
hu committed
1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
    m_Condition1 = (uint8_t)Get_ID_18F0010B_Sig_ASR_Offroad_Switch();

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239
void LED_ASR_or_EVSC_OFF_L_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
        IS31_CHIP0_CHANNEL18 = LED_BRIGHTNESS;
    }
    else
    {
        IS31_CHIP0_CHANNEL18 = 0x00;
    }

    if (led_status == 1)
    {
        SEG_LED_ASR_or_EVSC_OFF_L(7);
    }
    else
    {
        SEG_LED_ASR_or_EVSC_OFF_L(0);
    }
}
hu's avatar
hu committed
1240

hu's avatar
hu committed
1241
/******************************************************************************
hu's avatar
hu committed
1242
  L12 EVSC
hu's avatar
hu committed
1243 1244 1245 1246 1247
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_EVSC_L_Judgement(void)
hu's avatar
hu committed
1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
    uint8_t m_Condition2 = 0u;
    uint8_t m_Condition3 = 0u;
    uint8_t m_Condition4 = 0u;
    uint8_t m_Condition5 = 0u;
    uint8_t m_Condition6 = 0u;
    uint8_t m_Condition7 = 0u;

    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_BRAKE_AIR_EBS);
    m_Condition2 = (uint8_t)Get_ID_18F0010B_Sig_EBS_Red_Warning_Lamp_State();
    m_Condition3 = (uint8_t)Get_ID_18F0010B_Sig_ATC_or_ASR_Lamp_State();
    m_Condition4 = (uint8_t)Get_ID_18FE4F0B_Sig_VDC_Lamp_State();
    m_Condition5 = (uint8_t)Get_ID_18FE4F0B_Sig_VDC_Fully_operational();
    //m_Condition6 = (uint8_t)Get_ID_18FE4F0B_Sig_VDC_Lamp_State();
    //m_Condition7 = (uint8_t)Get_ID_18F0010B_Sig_ASR_Offroad_Switch();

    if ((m_Condition1 == 1u) || (m_Condition2 == 1u))
    {
        u8Result = 1u;
    }
    else if (m_Condition3 == 1u)
    {
        u8Result = FLASH_SYNC_5Hz;
    }
    else if (m_Condition4 == 1u)
    {
        u8Result = FLASH_SYNC_2Hz;
    }
    else if (m_Condition5 == 1u)
    {
        u8Result = FLASH_SYNC_1Hz;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1289
void LED_EVSC_L_Execution(uint8_t led_status)
hu's avatar
hu committed
1290
{
hu's avatar
hu committed
1291
    if (led_status == 1)
hu's avatar
hu committed
1292
    {
hu's avatar
hu committed
1293
        IS31_CHIP0_CHANNEL19 = LED_BRIGHTNESS;
hu's avatar
hu committed
1294 1295 1296
    }
    else
    {
hu's avatar
hu committed
1297
        IS31_CHIP0_CHANNEL19 = 0x00;
hu's avatar
hu committed
1298 1299
    }

hu's avatar
hu committed
1300
    if (led_status == 1)
hu's avatar
hu committed
1301
    {
hu's avatar
hu committed
1302
        SEG_LED_EVSC_L(7);
hu's avatar
hu committed
1303 1304 1305
    }
    else
    {
hu's avatar
hu committed
1306
        SEG_LED_EVSC_L(0);
hu's avatar
hu committed
1307 1308 1309
    }
}

hu's avatar
hu committed
1310
/******************************************************************************
hu's avatar
hu committed
1311
  L13 ECO STOP OFF
hu's avatar
hu committed
1312 1313 1314 1315 1316
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_eco_stop_OFF_L_Judgement(void)
hu's avatar
hu committed
1317 1318 1319
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1320
    m_Condition1 = (uint8_t)XXXX;
hu's avatar
hu committed
1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1333
void LED_eco_stop_OFF_L_Execution(uint8_t led_status)
hu's avatar
hu committed
1334
{
hu's avatar
hu committed
1335
    if (led_status == 1)
hu's avatar
hu committed
1336
    {
hu's avatar
hu committed
1337 1338
        IS31_CHIP0_CHANNEL12 = LED_BRIGHTNESS; // 绿灯 亮
        IS31_CHIP0_CHANNEL13 = 0x00; // 黄灯 灭
hu's avatar
hu committed
1339
    }
hu's avatar
hu committed
1340
    else if (led_status == 2)
hu's avatar
hu committed
1341
    {
hu's avatar
hu committed
1342 1343
        IS31_CHIP0_CHANNEL12 = 0x00; // 绿灯 灭
        IS31_CHIP0_CHANNEL13 = LED_BRIGHTNESS; // 黄灯 亮
hu's avatar
hu committed
1344 1345 1346
    }
    else
    {
hu's avatar
hu committed
1347 1348
        IS31_CHIP0_CHANNEL12 = 0x00; // 绿灯 灭
        IS31_CHIP0_CHANNEL13 = 0x00; // 黄灯 灭
hu's avatar
hu committed
1349 1350 1351
    }


hu's avatar
hu committed
1352
    if ((led_status == 1) || (led_status == 2))
hu's avatar
hu committed
1353
    {
hu's avatar
hu committed
1354
        SEG_LED_eco_stop_OFF_L(7);
hu's avatar
hu committed
1355 1356 1357
    }
    else
    {
hu's avatar
hu committed
1358
        SEG_LED_eco_stop_OFF_L(0);
hu's avatar
hu committed
1359 1360 1361
    }
}

hu's avatar
hu committed
1362
/******************************************************************************
hu's avatar
hu committed
1363
  L14 AMT
hu's avatar
hu committed
1364 1365 1366 1367 1368
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_AMT_L_Judgement(void)
hu's avatar
hu committed
1369 1370 1371 1372 1373
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
    uint8_t m_Condition2 = 0u;
    uint8_t m_Condition3 = 0u;
hu's avatar
hu committed
1374 1375 1376
    uint8_t m_Condition4 = 0u;
    uint8_t m_Condition5 = 0u;
    uint8_t m_Condition6 = 0u;
hu's avatar
hu committed
1377

hu's avatar
hu committed
1378 1379 1380 1381 1382 1383
    m_Condition1 = (uint8_t)Get_ID_18FECA03_Sig_Amber_Warning_Lamp_Status();
    m_Condition2 = (uint8_t)Get_ID_18FECA03_Sig_Malfunction_indicator_Lamp();
    m_Condition3 = (uint8_t)Get_ID_18EBFF03_Sig_Amber_Warning_Lamp_Status();
    m_Condition4 = (uint8_t)Get_ID_18EBFF03_Sig_Malfunction_indicator_Lamp();
    m_Condition5 = (uint8_t)Get_ID_18ECFF03_Sig_Amber_Warning_Lamp_Status();
    m_Condition6 = (uint8_t)Get_ID_18ECFF03_Sig_Malfunction_indicator_Lamp();
hu's avatar
hu committed
1384

hu's avatar
hu committed
1385 1386
    if ((m_Condition1 == 1u) || (m_Condition2 == 1u) || (m_Condition3 == 1u) ||
            (m_Condition4 == 1u) || (m_Condition5 == 1u) || (m_Condition6 == 1u))
hu's avatar
hu committed
1387 1388 1389 1390 1391 1392 1393 1394 1395 1396
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1397
void LED_AMT_L_Execution(uint8_t led_status)
hu's avatar
hu committed
1398
{
hu's avatar
hu committed
1399
    if (led_status == 1)
hu's avatar
hu committed
1400
    {
hu's avatar
hu committed
1401
        IS31_CHIP0_CHANNEL14 = LED_BRIGHTNESS;
hu's avatar
hu committed
1402 1403 1404
    }
    else
    {
hu's avatar
hu committed
1405
        IS31_CHIP0_CHANNEL14 = 0x00;
hu's avatar
hu committed
1406 1407
    }

hu's avatar
hu committed
1408
    if (led_status == 1)
hu's avatar
hu committed
1409
    {
hu's avatar
hu committed
1410
        SEG_LED_AMT_L(7);
hu's avatar
hu committed
1411 1412 1413
    }
    else
    {
hu's avatar
hu committed
1414
        SEG_LED_AMT_L(0);
hu's avatar
hu committed
1415 1416 1417
    }
}

hu's avatar
hu committed
1418
/******************************************************************************
hu's avatar
hu committed
1419
  L15 WEAR IND
hu's avatar
hu committed
1420 1421 1422 1423 1424
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_WEAR_IND_L_Judgement(void)
hu's avatar
hu committed
1425 1426 1427
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1428
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_WEAR_IND);
hu's avatar
hu committed
1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1441
void LED_WEAR_IND_L_Execution(uint8_t led_status)
hu's avatar
hu committed
1442 1443 1444
{
    if (led_status == 1)
    {
hu's avatar
hu committed
1445
        IS31_CHIP0_CHANNEL15 = LED_BRIGHTNESS;
hu's avatar
hu committed
1446 1447 1448
    }
    else
    {
hu's avatar
hu committed
1449
        IS31_CHIP0_CHANNEL15 = 0x00;
hu's avatar
hu committed
1450 1451 1452 1453
    }

    if (led_status == 1)
    {
hu's avatar
hu committed
1454
        SEG_LED_WEAR_IND_L(7);
hu's avatar
hu committed
1455 1456 1457
    }
    else
    {
hu's avatar
hu committed
1458
        SEG_LED_WEAR_IND_L(0);
hu's avatar
hu committed
1459 1460 1461
    }
}

hu's avatar
hu committed
1462
/******************************************************************************
hu's avatar
hu committed
1463 1464 1465 1466 1467 1468
 R1 PARK BRAKE
 信号接口:
 信号定义:
 输出信号:
******************************************************************************/
uint8_t LED_PARK_BRAKE_R_Judgement(void)
hu's avatar
hu committed
1469
{
hu's avatar
hu committed
1470 1471
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1472
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_PARK_BRAKE);
hu's avatar
hu committed
1473

hu's avatar
hu committed
1474
    if (m_Condition1 == 1u)
hu's avatar
hu committed
1475
    {
hu's avatar
hu committed
1476
        u8Result = 1u;
hu's avatar
hu committed
1477 1478 1479
    }
    else
    {
hu's avatar
hu committed
1480
        u8Result = 0u;
hu's avatar
hu committed
1481 1482
    }

hu's avatar
hu committed
1483 1484
    return u8Result;
}
hu's avatar
hu committed
1485
void LED_PARK_BRAKE_R_Execution(uint8_t led_status)
hu's avatar
hu committed
1486 1487 1488
{
    if (led_status == 1)
    {
hu's avatar
hu committed
1489
        IS31_CHIP0_CHANNEL08 = LED_BRIGHTNESS;
hu's avatar
hu committed
1490 1491 1492
    }
    else
    {
hu's avatar
hu committed
1493
        IS31_CHIP0_CHANNEL08 = 0x00;
hu's avatar
hu committed
1494 1495 1496 1497
    }

    if (led_status == 1)
    {
hu's avatar
hu committed
1498
        SEG_LED_PARK_BRAKE_R(7);
hu's avatar
hu committed
1499 1500 1501
    }
    else
    {
hu's avatar
hu committed
1502
        SEG_LED_PARK_BRAKE_R(0);
hu's avatar
hu committed
1503 1504 1505
    }
}

hu's avatar
hu committed
1506
/******************************************************************************
hu's avatar
hu committed
1507
  R2 BRAKE AIR/EBS
hu's avatar
hu committed
1508 1509 1510 1511
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
1512
uint8_t LED_BRAKE_AIR_or_EBS_RED_R_Judgement(void)
hu's avatar
hu committed
1513 1514 1515
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1516 1517
    uint8_t m_Condition2 = 0u;
    uint8_t m_Condition3 = 0u;
hu's avatar
hu committed
1518

hu's avatar
hu committed
1519 1520 1521 1522 1523
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_BRAKE_AIR_EBS);
    m_Condition2 = (uint8_t)Get_ID_18F0010B_Sig_ABS_Fully_Operational();
    m_Condition3 = (uint8_t)Get_ID_18F0010B_Sig_EBS_Red_Warning_Lamp_State();

    if ((m_Condition1 == 1u) || (m_Condition2 == 0u) || (m_Condition3 == 1u))
hu's avatar
hu committed
1524
    {
hu's avatar
hu committed
1525
        u8Result = 1u;
hu's avatar
hu committed
1526 1527 1528 1529 1530 1531 1532 1533
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1534
void LED_BRAKE_AIR_or_EBS_RED_R_Execution(uint8_t led_status)
hu's avatar
hu committed
1535
{
hu's avatar
hu committed
1536
    BRAKE_AIR_EBS_LED_MCU = led_status;
hu's avatar
hu committed
1537 1538 1539

    if (led_status == 1)
    {
hu's avatar
hu committed
1540
        SEG_LED_BRAKE_AIR_or_EBS_RED_R(7);
hu's avatar
hu committed
1541 1542 1543
    }
    else
    {
hu's avatar
hu committed
1544
        SEG_LED_BRAKE_AIR_or_EBS_RED_R(0);
hu's avatar
hu committed
1545 1546 1547
    }
}

hu's avatar
hu committed
1548
/******************************************************************************
hu's avatar
hu committed
1549
  R3 BRAKE LOCK
hu's avatar
hu committed
1550 1551
  信号接口:
  信号定义:
hu's avatar
hu committed
1552
  输出信号:
hu's avatar
hu committed
1553
 ******************************************************************************/
hu's avatar
hu committed
1554
uint8_t LED_BRAKE_LOCK_R_Judgement(void)
hu's avatar
hu committed
1555 1556 1557
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1558
    m_Condition1 = (uint8_t)XXXX;
hu's avatar
hu committed
1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1571
void LED_BRAKE_LOCK_R_Execution(uint8_t led_status)
hu's avatar
hu committed
1572
{
hu's avatar
hu committed
1573 1574 1575 1576 1577 1578 1579 1580
    if (led_status == 1)
    {
        IS31_CHIP0_CHANNEL07 = LED_BRIGHTNESS;
    }
    else
    {
        IS31_CHIP0_CHANNEL07 = 0x00;
    }
hu's avatar
hu committed
1581 1582 1583

    if (led_status == 1)
    {
hu's avatar
hu committed
1584
        SEG_LED_BRAKE_LOCK_R(7);
hu's avatar
hu committed
1585 1586 1587
    }
    else
    {
hu's avatar
hu committed
1588
        SEG_LED_BRAKE_LOCK_R(0);
hu's avatar
hu committed
1589 1590
    }
}
hu's avatar
hu committed
1591

hu's avatar
hu committed
1592
/******************************************************************************
hu's avatar
hu committed
1593
  R4 AIR SUS
hu's avatar
hu committed
1594 1595 1596 1597
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
1598
uint8_t LED_AIR_SUS_R_Judgement(void)
hu's avatar
hu committed
1599 1600 1601
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1602
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_AIR_SUS);
hu's avatar
hu committed
1603

hu's avatar
hu committed
1604
    if (m_Condition1 == 1u)
hu's avatar
hu committed
1605 1606 1607 1608 1609 1610 1611
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }
hu's avatar
hu committed
1612

hu's avatar
hu committed
1613 1614
    return u8Result;
}
hu's avatar
hu committed
1615
void LED_AIR_SUS_R_Execution(uint8_t led_status)
hu's avatar
hu committed
1616
{
hu's avatar
hu committed
1617 1618 1619 1620 1621 1622 1623 1624
    if (led_status == 1)
    {
        IS31_CHIP0_CHANNEL06 = LED_BRIGHTNESS;
    }
    else
    {
        IS31_CHIP0_CHANNEL06 = 0x00;
    }
hu's avatar
hu committed
1625 1626 1627

    if (led_status == 1)
    {
hu's avatar
hu committed
1628
        SEG_LED_AIR_SUS_R(7);
hu's avatar
hu committed
1629 1630 1631
    }
    else
    {
hu's avatar
hu committed
1632
        SEG_LED_AIR_SUS_R(0);
hu's avatar
hu committed
1633 1634 1635
    }
}

hu's avatar
hu committed
1636
/******************************************************************************
hu's avatar
hu committed
1637 1638 1639 1640 1641 1642
  R5 TRAILER BRAKE
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_TRAILER_BRAKE_R_Judgement(void)
hu's avatar
hu committed
1643 1644 1645
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1646
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_TRAILER_BRAKE);
hu's avatar
hu committed
1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1659
void LED_TRAILER_BRAKE_R_Execution(uint8_t led_status)
hu's avatar
hu committed
1660 1661 1662
{
    if (led_status == 1)
    {
hu's avatar
hu committed
1663
        IS31_CHIP0_CHANNEL10 = LED_BRIGHTNESS;
hu's avatar
hu committed
1664 1665 1666
    }
    else
    {
hu's avatar
hu committed
1667
        IS31_CHIP0_CHANNEL10 = 0x00;
hu's avatar
hu committed
1668 1669 1670 1671
    }

    if (led_status == 1)
    {
hu's avatar
hu committed
1672
        SEG_LED_TRAILER_BRAKE_R(7);
hu's avatar
hu committed
1673 1674 1675
    }
    else
    {
hu's avatar
hu committed
1676
        SEG_LED_TRAILER_BRAKE_R(0);
hu's avatar
hu committed
1677 1678 1679
    }
}

hu's avatar
hu committed
1680
/******************************************************************************
hu's avatar
hu committed
1681
  R6 BRAKE AIR/EBS
hu's avatar
hu committed
1682 1683 1684 1685
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
1686
uint8_t LED_BRAKE_AIR_or_EBS_YELLOW_R_Judgement(void)
hu's avatar
hu committed
1687 1688 1689
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1690
    m_Condition1 = (uint8_t)Get_ID_18F0010B_Sig_EBS_Amber_Warning_State();
hu's avatar
hu committed
1691

hu's avatar
hu committed
1692
    if (m_Condition1 == 1u)
hu's avatar
hu committed
1693
    {
hu's avatar
hu committed
1694
        u8Result = 0u;
hu's avatar
hu committed
1695 1696 1697 1698 1699 1700 1701 1702
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1703
void LED_BRAKE_AIR_or_EBS_YELLOW_R_Execution(uint8_t led_status)
hu's avatar
hu committed
1704
{
hu's avatar
hu committed
1705 1706 1707 1708 1709 1710 1711 1712
    if (led_status == 1)
    {
        IS31_CHIP0_CHANNEL09 = LED_BRIGHTNESS;
    }
    else
    {
        IS31_CHIP0_CHANNEL09 = 0x00;
    }
hu's avatar
hu committed
1713 1714 1715

    if (led_status == 1)
    {
hu's avatar
hu committed
1716
        SEG_LED_BRAKE_AIR_or_EBS_YELLOW_R(7);
hu's avatar
hu committed
1717 1718 1719
    }
    else
    {
hu's avatar
hu committed
1720
        SEG_LED_BRAKE_AIR_or_EBS_YELLOW_R(0);
hu's avatar
hu committed
1721 1722 1723
    }
}

hu's avatar
hu committed
1724
/******************************************************************************
hu's avatar
hu committed
1725
  R7  ACC AIR
hu's avatar
hu committed
1726 1727
  信号接口:
  信号定义:
hu's avatar
hu committed
1728
  输出信号: R6_LED_OUT
hu's avatar
hu committed
1729
 ******************************************************************************/
hu's avatar
hu committed
1730
uint8_t LED_ACC_AIR_R_Judgement(void)
hu's avatar
hu committed
1731 1732 1733
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1734
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_ACC_AIR);
hu's avatar
hu committed
1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1747 1748

void LED_ACC_AIR_R_Execution(uint8_t led_status)
hu's avatar
hu committed
1749
{
hu's avatar
hu committed
1750
    R6_LED_OUT = led_status;
hu's avatar
hu committed
1751 1752 1753

    if (led_status == 1)
    {
hu's avatar
hu committed
1754
        SEG_LED_ACC_AIR_R(7);
hu's avatar
hu committed
1755 1756 1757
    }
    else
    {
hu's avatar
hu committed
1758
        SEG_LED_ACC_AIR_R(0);
hu's avatar
hu committed
1759 1760
    }
}
hu's avatar
hu committed
1761
/******************************************************************************
hu's avatar
hu committed
1762
  R8 ABS
hu's avatar
hu committed
1763 1764 1765 1766
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
hu's avatar
hu committed
1767
uint8_t LED_ABS_R_Judgement(void)
hu's avatar
hu committed
1768 1769 1770
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
hu's avatar
hu committed
1771
    uint8_t m_Condition2 = 0u;
hu's avatar
hu committed
1772

hu's avatar
hu committed
1773
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_ABS);
hu's avatar
hu committed
1774
    m_Condition2 = (uint8_t)Get_ID_18F0010B_Sig_EBS_Amber_Warning_State();
hu's avatar
hu committed
1775 1776

    if ((m_Condition1 == 1u) || (m_Condition2 == 1u))
hu's avatar
hu committed
1777 1778 1779 1780 1781 1782 1783 1784 1785 1786
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1787
void LED_ABS_R_Execution(uint8_t led_status)
hu's avatar
hu committed
1788
{
hu's avatar
hu committed
1789
    ABS_LED_MCU_OUT = led_status;
hu's avatar
hu committed
1790 1791 1792

    if (led_status == 1)
    {
hu's avatar
hu committed
1793
        SEG_LED_ABS_R(7);
hu's avatar
hu committed
1794 1795 1796
    }
    else
    {
hu's avatar
hu committed
1797
        SEG_LED_ABS_R(0);
hu's avatar
hu committed
1798 1799 1800
    }
}

hu's avatar
hu committed
1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858
/******************************************************************************
U2 TRAILER ABS
  信号接口:
  信号定义:
  输出信号:U2_LED_OUT
 ******************************************************************************/
uint8_t LED_TRAILER_ABS_U_Judgement(void)
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_TRAILER_ABS);

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}

void LED_TRAILER_ABS_U_Execution(uint8_t led_status)
{
    //U2_LED_OUT = led_status;

    if (led_status == 1)
    {
        SEG_LED_TRAILER_ABS_U(7);
    }
    else
    {
        SEG_LED_TRAILER_ABS_U(0);
    }
}

/******************************************************************************
U3 WORKING LAMP
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_WORKING_LAMP_U_Judgement(void)
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
    m_Condition1 = (uint8_t)XXXX;

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }
hu's avatar
hu committed
1859

hu's avatar
hu committed
1860 1861
    return u8Result;
}
hu's avatar
hu committed
1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882
void LED_WORKING_LAMP_U_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
        IS31_CHIP0_CHANNEL11 = LED_BRIGHTNESS;
    }
    else
    {
        IS31_CHIP0_CHANNEL11 = 0x00;
    }

    if (led_status == 1)
    {
        SEG_LED_WORKING_LAMP_U(7);
    }
    else
    {
        SEG_LED_WORKING_LAMP_U(0);
    }
}

hu's avatar
hu committed
1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894
/******************************************************************************
U6 TRAILE ABS INFO
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_TRAILER_ABS_INFO_U_Judgement(void)
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
    m_Condition1 = (uint8_t)Line_In_Get_Status(LINE_IN_TRAILER_ABS_INFO);

hu's avatar
hu committed
1895
    if (m_Condition1 == 0x01u)
hu's avatar
hu committed
1896 1897 1898 1899 1900 1901 1902 1903 1904 1905
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
hu's avatar
hu committed
1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924
void LED_TRAILER_ABS_INFO_U_Execution(uint8_t led_status)
{
    if (led_status == 1)
    {
        IS31_CHIP0_CHANNEL05 = LED_BRIGHTNESS;
    }
    else
    {
        IS31_CHIP0_CHANNEL05 = 0x00;
    }

    if (led_status == 1)
    {
        SEG_LED_TRAILER_ABS_INFO_U(7);
    }
    else
    {
        SEG_LED_TRAILER_ABS_INFO_U(0);
    }
hu's avatar
hu committed
1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005
}

/******************************************************************************
Temp
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_Temp_Judgement(void)
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
void LED_Temp_Execution(uint8_t led_status)
{
    if (led_status == 1u)
    {
        //TimerB_PWM_Channel_Duty_Set(TIMERB_2_CH7 , testBG );//水温格白色
        TEMP_R_LED_OUT = 1u ;/*水温红灯*/
        Water_Temp_Led_R_MCU_OUT = 1u;

        TEMP_W_LED_OUT = 0u ;//水温字符白色指示灯
        Water_Temp_Led_W_MCU_OUT = 0u;
    }
    else
    {
        TEMP_R_LED_OUT = 0u ;/*水温红灯*/
        Water_Temp_Led_R_MCU_OUT = 0u;

        TEMP_W_LED_OUT = 1u ;//水温字符白色指示灯
        Water_Temp_Led_W_MCU_OUT = 1u;
    }
}

/******************************************************************************
Fuel
  信号接口:
  信号定义:
  输出信号:
 ******************************************************************************/
uint8_t LED_Fuel_Judgement(void)
{
    uint8_t u8Result = 0u;
    uint8_t m_Condition1 = 0u;
    //m_Condition1 = Fuel_Get_LowAlarm();

    if (m_Condition1 == 1u)
    {
        u8Result = 1u;
    }
    else
    {
        u8Result = 0u;
    }

    return u8Result;
}
void LED_Fuel_Execution(uint8_t led_status)
{
    if (led_status == 1u)

    {
        FUEL_LED_Y_MCU = 1U ;
        FUEL_W_LED_OUT = 0U ;
    }
    else
    {
        FUEL_LED_Y_MCU = 0U ;
        FUEL_W_LED_OUT = 1U ;
    }
hu's avatar
hu committed
2006
}