EOL_Para.c 5.71 KB
Newer Older
hu's avatar
hu committed
1 2 3 4 5 6
#include "EOL_Para.h"

_EOL_Data_Type EOL_Data_Type;

void EOL_InitVal(void)
{
hu's avatar
hu committed
7
    EOL_Data_Type.Flag = 0x7AA7A55Au;
hu's avatar
hu committed
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
    EOL_Data_Type.DID_605C = 1u;
    EOL_Data_Type.DID_605D = 1u;
    EOL_Data_Type.DID_605E = 1u;
    EOL_Data_Type.DID_605F = 1u;
    EOL_Data_Type.DID_6060 = 1u;
    EOL_Data_Type.DID_6062[0u] = 0x1Fu;
    EOL_Data_Type.DID_6062[1u] = 0x40;
    EOL_Data_Type.DID_6063 = 1u;
    EOL_Data_Type.DID_6064 = 1u;
    EOL_Data_Type.DID_6068 = 1u;
    EOL_Data_Type.DID_606D = 1u;
    EOL_Data_Type.DID_606E = 1u;
    EOL_Data_Type.DID_606F[0u] = 0x00;
    EOL_Data_Type.DID_606F[1u] = 0x64;
    EOL_Data_Type.DID_6070 = 1u;
    EOL_Data_Type.DID_6071 = 1u;
    EOL_Data_Type.DID_6072 = 1u;
    EOL_Data_Type.DID_6073 = 1u;
    EOL_Data_Type.DID_6074 = 1u;
    EOL_Data_Type.DID_6075 = 1u;
    EOL_Data_Type.DID_6076[0u] = 0x00u;
    EOL_Data_Type.DID_6076[1u] = 0x00u;
    EOL_Data_Type.DID_6076[2u] = 0x00u;
    EOL_Data_Type.DID_60C9 = 1u;
    EOL_Data_Type.DID_60CA[0u] = 0x00u;
    EOL_Data_Type.DID_60CA[1u] = 0x64u;
    EOL_Data_Type.DID_60CB[0u] = 0x00u;
    EOL_Data_Type.DID_60CB[1u] = 0x64u;
    EOL_Data_Type.DID_60CC = 0x01u;
    EOL_Data_Type.DID_60CD[0u] = 0x00u;
    EOL_Data_Type.DID_60CD[1u] = 0x1u;
    EOL_Data_Type.DID_60CE = 1u;
    EOL_Data_Type.DID_60CF = 1u;
    EOL_Data_Type.DID_60D0 = 1u;
    EOL_Data_Type.DID_60D1 = 1u;
    EOL_Data_Type.DID_60D2 = 1u;
}

/*LDWS(车道偏离)系统开关*/
uint8_t Val_EOL_605C_LDWS(void)
{
hu's avatar
hu committed
49 50 51
    uint8_t Res;
    Res = EOL_Data_Type.DID_605C;
    return Res;
hu's avatar
hu committed
52 53 54 55 56
}

/*AFS 系统开关*/
uint8_t Val_EOL_605D_AFS(void)
{
hu's avatar
hu committed
57 58 59
    uint8_t Res;
    Res = EOL_Data_Type.DID_605D;
    return Res;
hu's avatar
hu committed
60 61 62 63 64
}

/*HUD 系统开关*/
uint8_t Val_EOL_605E_HUD(void)
{
hu's avatar
hu committed
65 66 67
    uint8_t Res;
    Res = EOL_Data_Type.DID_605E;
    return Res;
hu's avatar
hu committed
68 69 70 71 72
}

/* ACC 系统开关关*/
uint8_t Val_EOL_605F_ACC(void)
{
hu's avatar
hu committed
73 74 75
    uint8_t Res;
    Res = EOL_Data_Type.DID_605F;
    return Res;
hu's avatar
hu committed
76 77 78 79 80
}

/* 称重系统开关*/
uint8_t Val_EOL_6060_Weigh(void)
{
hu's avatar
hu committed
81 82 83
    uint8_t Res;
    Res = EOL_Data_Type.DID_6060;
    return Res;
hu's avatar
hu committed
84 85 86 87 88
}

/* 车速里程表 K 值*/
uint16_t Val_EOL_6062_KValue(void)
{
hu's avatar
hu committed
89 90 91 92 93
    uint16_t Res;
    Res = 0u;
    Res = Res | (EOL_Data_Type.DID_6062[0u] << 8u);
    Res = (Res & 0xFF00u) | EOL_Data_Type.DID_6062[1u];
    return Res;
hu's avatar
hu committed
94 95 96 97 98
}

/* 发动机速比*/
uint8_t Val_EOL_6063_Engine(void)
{
hu's avatar
hu committed
99 100 101
    uint8_t Res;
    Res = EOL_Data_Type.DID_6063;
    return Res;
hu's avatar
hu committed
102 103 104 105 106
}

/* 单位*/
uint8_t Val_EOL_6064_Unit(void)
{
hu's avatar
hu committed
107 108 109
    uint8_t Res;
    Res = EOL_Data_Type.DID_6064;
    return Res;
hu's avatar
hu committed
110 111 112 113 114
}

/* 语言*/
uint8_t Val_EOL_6068_Language(void)
{
hu's avatar
hu committed
115 116 117
    uint8_t Res;
    Res = EOL_Data_Type.DID_6068;
    return Res;
hu's avatar
hu committed
118 119 120 121 122
}

/* 轮胎防盗使能开关*/
uint8_t Val_EOL_606D_TireAntiTheft(void)
{
hu's avatar
hu committed
123 124 125
    uint8_t Res;
    Res = EOL_Data_Type.DID_606D;
    return Res;
hu's avatar
hu committed
126 127 128 129 130
}

/* 换挡提示设置*/
uint8_t Val_EOL_606E_Shift(void)
{
hu's avatar
hu committed
131 132 133
    uint8_t Res;
    Res = EOL_Data_Type.DID_606E;
    return Res;
hu's avatar
hu committed
134 135 136 137 138
}

/* 油箱容量设置*/
uint16_t Val_EOL_606F_FuelTank(void)
{
hu's avatar
hu committed
139 140 141 142 143
    uint16_t Res;
    Res = 0u;
    Res = Res | (EOL_Data_Type.DID_606F[0u] << 8u);
    Res = (Res & 0xFF00u) | EOL_Data_Type.DID_606F[1u];
    return Res;
hu's avatar
hu committed
144 145 146 147 148
}

/* HAS 系统开关*/
uint8_t Val_EOL_6070_HAS(void)
{
hu's avatar
hu committed
149 150 151
    uint8_t Res;
    Res = EOL_Data_Type.DID_6070;
    return Res;
hu's avatar
hu committed
152 153 154 155 156
}

/* ESC 系统开关*/
uint8_t Val_EOL_6071_ESC(void)
{
hu's avatar
hu committed
157 158 159
    uint8_t Res;
    Res = EOL_Data_Type.DID_6071;
    return Res;
hu's avatar
hu committed
160 161 162 163 164
}

/* 盘式制动磨损报警功能*/
uint8_t Val_EOL_6072_DiscBrake(void)
{
hu's avatar
hu committed
165 166 167
    uint8_t Res;
    Res = EOL_Data_Type.DID_6072;
    return Res;
hu's avatar
hu committed
168 169 170 171 172
}

/*挂车设置*/
uint8_t Val_EOL_6073_SetRrailer(void)
{
hu's avatar
hu committed
173 174 175
    uint8_t Res;
    Res = EOL_Data_Type.DID_6073;
    return Res;
hu's avatar
hu committed
176 177 178 179 180
}

/*排放配置*/
uint8_t Val_EOL_6074_Emission(void)
{
hu's avatar
hu committed
181 182 183
    uint8_t Res;
    Res = EOL_Data_Type.DID_6074;
    return Res;
hu's avatar
hu committed
184 185 186 187 188
}

/*超速报警车型信号*/
uint8_t Val_EOL_6075_SpeedAlarm(void)
{
hu's avatar
hu committed
189 190 191
    uint8_t Res;
    Res = EOL_Data_Type.DID_6075;
    return Res;
hu's avatar
hu committed
192 193 194 195 196
}

/* 油箱容量设置*/
uint32_t Val_EOL_6076_FuelTank(void)
{
hu's avatar
hu committed
197 198 199 200 201 202 203
    uint32_t Res = 0u;

    Res = (uint8_t)(EOL_Data_Type.DID_6076[0u] & 0xFFU);
    Res = ((Res << 8) & 0XFF00u);
    Res = ((Res | EOL_Data_Type.DID_6076[1u]) & 0x00FFFFu);
    Res = ((Res << 8u) & 0xFFFF00u);
    Res = ((Res | EOL_Data_Type.DID_6076[2u]) & 0xFFFFFFu);
hu's avatar
hu committed
204 205 206 207 208 209
    return Res;
}

/*尿素箱容积*/
uint8_t Val_EOL_60C9_Urea(void)
{
hu's avatar
hu committed
210 211 212
    uint8_t Res;
    Res = EOL_Data_Type.DID_60C9;
    return Res;
hu's avatar
hu committed
213 214 215 216 217
}

/* 主油箱容积*/
uint16_t Val_EOL_60CA_MainFuelTank(void)
{
hu's avatar
hu committed
218 219 220 221 222
    uint16_t Res;
    Res = 0u;
    Res = Res | (EOL_Data_Type.DID_60CA[0u] << 8u);
    Res = (Res & 0xFF00u) | EOL_Data_Type.DID_60CA[1u];
    return Res;
hu's avatar
hu committed
223 224 225 226 227
}

/* 副油箱容积*/
uint16_t Val_EOL_60CB_AuxiliaryTank(void)
{
hu's avatar
hu committed
228 229 230 231 232
    uint16_t Res;
    Res = 0;
    Res = Res | (EOL_Data_Type.DID_60CB[0u] << 8u);
    Res = (Res & 0xFF00u) | EOL_Data_Type.DID_60CB[1u];
    return Res;
hu's avatar
hu committed
233 234 235 236 237
}

/*油箱类型*/
uint8_t Val_EOL_60CC_FuelTankType(void)
{
hu's avatar
hu committed
238 239 240
    uint8_t Res;
    Res = EOL_Data_Type.DID_60CC;
    return Res;
hu's avatar
hu committed
241 242 243 244 245
}

/* 发动机类型*/
uint16_t Val_EOL_60CD_EngineType(void)
{
hu's avatar
hu committed
246 247 248 249 250
    uint16_t Res;
    Res = 0;
    Res = Res | (EOL_Data_Type.DID_60CD[0u] << 8u);
    Res = (Res & 0xFF00u) | EOL_Data_Type.DID_60CD[1u];
    return Res;
hu's avatar
hu committed
251 252 253 254 255
}

/*TCU 类型*/
uint8_t Val_EOL_60CE_FuelTankType(void)
{
hu's avatar
hu committed
256 257 258
    uint8_t Res;
    Res = EOL_Data_Type.DID_60CE;
    return Res;
hu's avatar
hu committed
259 260 261 262 263
}

/*驱动能源类型*/
uint8_t Val_EOL_60CF_DriveEnergy(void)
{
hu's avatar
hu committed
264 265 266
    uint8_t Res;
    Res = EOL_Data_Type.DID_60CF;
    return Res;
hu's avatar
hu committed
267 268 269 270 271 272
}


/*驱动形式*/
uint8_t Val_EOL_60D0_DriveForm(void)
{
hu's avatar
hu committed
273 274 275
    uint8_t Res;
    Res = EOL_Data_Type.DID_60D0;
    return Res;
hu's avatar
hu committed
276 277 278 279 280
}

/*蓄电池容量*/
uint8_t Val_EOL_60D1_BatteryCapacity(void)
{
hu's avatar
hu committed
281 282 283
    uint8_t Res;
    Res = EOL_Data_Type.DID_60D1;
    return Res;
hu's avatar
hu committed
284 285 286 287 288
}

/*电池管理系统*/
uint8_t Val_EOL_60D2_BatteryManagement(void)
{
hu's avatar
hu committed
289 290 291 292
    uint8_t Res;
    Res = EOL_Data_Type.DID_60D2;
    return Res;
}