Commit 2ee99087 authored by hu's avatar hu

更换CAN驱动文件,增加工厂模式部分菜单项,修改了ODOBUG

parent c4d9c18b
......@@ -5,6 +5,7 @@
.\Analog_Signals\Analog_Circuits.c
.\Analog_Signals\Analog_Signals.c
.\CAN\RSCAN.c
.\CAN\RSCAN_Table.h
.\Clock\Clock.c
.\Clock\RTC.c
.\Common\debugger.c
......
......@@ -7,19 +7,19 @@ Platform_16Bit
*/
#ifdef Platform_16Bit
#define Millib_uint8_t unsigned char
#define Millib_uint16_t unsigned int
#define Millib_uint32_t unsigned long
#define Millib_uint8_t unsigned char
#define Millib_uint16_t unsigned int
#define Millib_uint32_t unsigned long
#else
#define Millib_uint8_t unsigned char
#define Millib_uint16_t unsigned short
#define Millib_uint32_t unsigned int
#define Millib_uint64_t unsigned long long
#define Millib_uint8_t unsigned char
#define Millib_uint16_t unsigned short
#define Millib_uint32_t unsigned int
#define Millib_uint64_t unsigned long long
#endif
#ifndef Millib_NULL
#define Millib_NULL (void *)0u
#define Millib_NULL (void *)0u
#endif /* NULL */
typedef enum
......@@ -54,25 +54,25 @@ typedef struct
Millib_uint16_t (*Get_Act_V_Speed)(void);
Millib_uint16_t (*Get_TireSize)(void);
EEPromWrite EEPromWrite_Cbk;
}Mileage_Func_t;
} Mileage_Func_t;
typedef struct
{
Millib_uint32_t Mileage;
}Mileage_Init_t;
} Mileage_Init_t;
typedef struct
{
Millib_uint32_t Stamp;
Millib_uint32_t Offset;
}ODO_Init_t;
} ODO_Init_t;
typedef struct
{
Millib_uint32_t Stamp;
Millib_uint32_t MaxValue;
Millib_uint8_t IsRestart;
}Trip_Init_t;
} Trip_Init_t;
#define Data_MEM_Block_Mileage ((Millib_uint8_t)12u)
#define Data_MEM_Block_ODO ((Millib_uint8_t)12u)
......@@ -85,7 +85,7 @@ void Data_Mileage_KL30_Init(Millib_uint8_t *pMemSpace, Mileage_Init_t *pInitData
void Data_Mileage_Wakeup_Init(Millib_uint8_t *pMemSpace, Mileage_Func_t *pFunc);
void Data_Mileage_ISR(void);
Millib_uint32_t Data_Mileage_Read(void);
Millib_uint8_t Data_Mileage_Write(Millib_uint32_t NewMileage);
Millib_uint8_t Data_Mileage_Write(Millib_uint32_t NewMileage);/*在初始化之后用 0.1KM*/
void Data_Mileage_Clear(void);
void Data_Mileage_Write_EEPROM(void);
......
......@@ -29,7 +29,7 @@ static void Data_User_EEPROM_Write(Data_EEPROM_Enum_t BlockID, uint32_t u32Data[
******************************************************************************/
void Data_User_Mileage_KL30Init(void)
{
uint32_t TempBuf[7] = {0};
uint32_t TempBuf[EM_TRIP_MAX + 3] = {0};
Mileage_Init_t MileInit = {0};
Mileage_Func_t Func = {0};
ODO_Init_t ODOInit = {0};
......@@ -50,7 +50,7 @@ void Data_User_Mileage_KL30Init(void)
ODOInit.Offset = TempBuf[2];
Data_ODO_KL30_Init(DataODOBuf, &ODOInit, Func.EEPromWrite_Cbk);
Data_User_EEPROM_Read(EEPROM_BLOCK_TRIP_STAMP, TempBuf + 3, 9);
Data_User_EEPROM_Read(EEPROM_BLOCK_TRIP_STAMP, TempBuf + 3, EM_TRIP_MAX);
TripInit[EM_TRIP_A].Stamp = TempBuf[3];
TripInit[EM_TRIP_A].MaxValue = 9999999u;
......
......@@ -218,7 +218,7 @@ void Test_LED_AllLight(void)
/*---------------------------------------------------------------------------*/
#define XXXX 0u
#define LED_BRIGHTNESS 0xff
#define LED_BRIGHTNESS 0x3Fu
/******************************************************************************
T1 INTER DIFF LOCK
......
......@@ -1153,7 +1153,7 @@ void Popup_Alone_Sound_Server(void)
{
if (u8IG_st == COMMON_POWER_ON)
{
#if 0
/*00 忘拔钥匙*/
Sound_Delete(SND_Key_Notremoved);
......@@ -1422,19 +1422,19 @@ void Popup_Alone_Sound_Server(void)
{
Sound_Delete(SND_Fuel_Saving);
}
#endif
/*音源测试程序*/
// if(Sound_test&0x001) Sound_Request (SND_Key_Notremoved, 1); else Sound_Delete(SND_Key_Notremoved );
// if(Sound_test&0x002) Sound_Request (SND_Braking, 1); else Sound_Delete(SND_Braking );
// if(Sound_test&0x004) Sound_Request (SND_Air_Brake, 1); else Sound_Delete(SND_Air_Brake );
// if(Sound_test&0x008) Sound_Request (SND_BRAKE_LOCK, 1); else Sound_Delete(SND_BRAKE_LOCK );
// if(Sound_test&0x010) Sound_Request (SND_Parking_Brake, 1); else Sound_Delete(SND_Parking_Brake );
// if(Sound_test&0x020) Sound_Request (SND_Car_Dump_SPEED, 1); else Sound_Delete(SND_Car_Dump_SPEED );
// if(Sound_test&0x040) Sound_Request (SND_Temp_High, 1); else Sound_Delete(SND_Temp_High );
// if(Sound_test&0x080) Sound_Request (SND_Coolant_Low, 1); else Sound_Delete(SND_Coolant_Low );
// if(Sound_test&0x100) Sound_Request (SND_Oil_pressure_Low, 1); else Sound_Delete(SND_Oil_pressure_Low );
// if(Sound_test&0x200) Sound_Request (SND_ACC_AIR, 1); else Sound_Delete(SND_ACC_AIR );
// if(Sound_test&0x400) Sound_Request (SND_BackUP_SPEED, 1); else Sound_Delete(SND_BackUP_SPEED );
if (Sound_test & 0x001) Sound_Request (SND_Key_Notremoved, 1); else Sound_Delete(SND_Key_Notremoved );
if (Sound_test & 0x002) Sound_Request (SND_Braking, 1); else Sound_Delete(SND_Braking );
if (Sound_test & 0x004) Sound_Request (SND_Air_Brake, 1); else Sound_Delete(SND_Air_Brake );
if (Sound_test & 0x008) Sound_Request (SND_BRAKE_LOCK, 1); else Sound_Delete(SND_BRAKE_LOCK );
if (Sound_test & 0x010) Sound_Request (SND_Parking_Brake, 1); else Sound_Delete(SND_Parking_Brake );
if (Sound_test & 0x020) Sound_Request (SND_Car_Dump_SPEED, 1); else Sound_Delete(SND_Car_Dump_SPEED );
if (Sound_test & 0x040) Sound_Request (SND_Temp_High, 1); else Sound_Delete(SND_Temp_High );
if (Sound_test & 0x080) Sound_Request (SND_Coolant_Low, 1); else Sound_Delete(SND_Coolant_Low );
if (Sound_test & 0x100) Sound_Request (SND_Oil_pressure_Low, 1); else Sound_Delete(SND_Oil_pressure_Low );
if (Sound_test & 0x200) Sound_Request (SND_ACC_AIR, 1); else Sound_Delete(SND_ACC_AIR );
if (Sound_test & 0x400) Sound_Request (SND_BackUP_SPEED, 1); else Sound_Delete(SND_BackUP_SPEED );
}
else /*IG-OFF*/
{
......
......@@ -54,68 +54,90 @@ typedef enum
_MN_DSP_LEVEL2_4_MENU_1, /* 26 设定日期*/
_MN_DSP_LEVEL2_4_MENU_2, /* 27 设定时间*/
_MN_DSP_LEVEL2_4_MENU_7, /* 亮度调节*/
_MN_DSP_LEVEL2_4_MENU_3, /* 28 语言设定*/
_MN_DSP_LEVEL2_4_MENU_4, /* 29 设定节油驾驶建议*/
_MN_DSP_LEVEL2_4_MENU_5, /* 30 TPMS轮胎设定*/
_MN_DSP_LEVEL2_4_MENU_6, /* 31 显示设定*/
_MN_DSP_LEVEL2_4_MENU_7, /* 28 亮度调节*/
_MN_DSP_LEVEL2_4_MENU_3, /* 29 语言设定*/
_MN_DSP_LEVEL2_4_MENU_4, /* 30 设定节油驾驶建议*/
_MN_DSP_LEVEL2_4_MENU_5, /* 31 TPMS轮胎设定*/
_MN_DSP_LEVEL2_4_MENU_6, /* 32 显示设定*/
_MN_DSP_LEVEL2_5_MENU_1, /* 32 LDWS 警报演示*/
_MN_DSP_LEVEL2_5_MENU_2, /* 33 AEBS第1警报演示*/
_MN_DSP_LEVEL2_5_MENU_3, /* 34 AEBS第2警报演示*/
_MN_DSP_LEVEL2_5_MENU_4, /* 35 AEBS全力制动警报演示*/
_MN_DSP_LEVEL2_5_MENU_1, /* 33 LDWS 警报演示*/
_MN_DSP_LEVEL2_5_MENU_2, /* 34 AEBS第1警报演示*/
_MN_DSP_LEVEL2_5_MENU_3, /* 35 AEBS第2警报演示*/
_MN_DSP_LEVEL2_5_MENU_4, /* 36 AEBS全力制动警报演示*/
_MN_DSP_LEVEL2_6_MENU_1, /* 36 轮胎气压*/
_MN_DSP_LEVEL2_6_MENU_2, /* 37 轮胎温度*/
_MN_DSP_LEVEL2_6_MENU_1, /* 37 轮胎气压*/
_MN_DSP_LEVEL2_6_MENU_2, /* 38 轮胎温度*/
/*三级菜单*/
_MN_DSP_LEVEL3_2_MENU_1, /* 38 发动机机油&滤清器*/
_MN_DSP_LEVEL3_2_MENU_2, /* 39 燃油滤清器*/
_MN_DSP_LEVEL3_2_MENU_3, /* 40 变速箱油*/
_MN_DSP_LEVEL3_2_MENU_4, /* 41 差速器油*/
_MN_DSP_LEVEL3_2_MENU_7, /* 42 动力转向液*/
_MN_DSP_LEVEL3_2_MENU_8, /* 43 轮胎*/
_MN_DSP_LEVEL3_3_MENU_1, /* 44 更换机油&机油滤清器*/
_MN_DSP_LEVEL3_3_MENU_2, /* 45 更换燃油滤清器*/
_MN_DSP_LEVEL3_3_MENU_3, /* 46 更换变速箱油*/
_MN_DSP_LEVEL3_3_MENU_4, /* 47 更换差速器油*/
_MN_DSP_LEVEL3_3_MENU_6, /* 48 更换动力转向液*/
_MN_DSP_LEVEL3_3_MENU_7, /* 49 轮胎换位・更换*/
_MN_DSP_LEVEL3_4_MENU_11, /* 50 设定日期-年*/
_MN_DSP_LEVEL3_4_MENU_12, /* 51 设定日期-月*/
_MN_DSP_LEVEL3_4_MENU_13, /* 52 设定日期-日*/
_MN_DSP_LEVEL3_4_MENU_21, /* 53 设定时间-时*/
_MN_DSP_LEVEL3_4_MENU_22, /* 54 设定时间-分*/
_MN_DSP_LEVEL3_4_MENU_3, /* 55 设定语言*/
_MN_DSP_LEVEL3_4_MENU_41, /* 56 速度设定-高速路*/
_MN_DSP_LEVEL3_4_MENU_42, /* 57 速度设定-一般路*/
_MN_DSP_LEVEL3_4_MENU_43, /* 58 发动机转速设定*/
_MN_DSP_LEVEL3_4_MENU_44, /* 59 急加速设定*/
_MN_DSP_LEVEL3_4_MENU_45, /* 60 急减速设定*/
_MN_DSP_LEVEL3_4_MENU_46, /* 61 长时间怠速设定*/
_MN_DSP_LEVEL3_4_MENU_47, /* 62 辅助驻车解除设定*/
_MN_DSP_LEVEL3_4_MENU_5, /* 63 轮胎匹配画面*/
_MN_DSP_LEVEL3_7_MENU_1, /* 亮度调节*/
_MN_DSP_LEVEL3_2_MENU_1, /* 39 发动机机油&滤清器*/
_MN_DSP_LEVEL3_2_MENU_2, /* 40 燃油滤清器*/
_MN_DSP_LEVEL3_2_MENU_3, /* 41 变速箱油*/
_MN_DSP_LEVEL3_2_MENU_4, /* 42 差速器油*/
_MN_DSP_LEVEL3_2_MENU_7, /* 43 动力转向液*/
_MN_DSP_LEVEL3_2_MENU_8, /* 44 轮胎*/
_MN_DSP_LEVEL3_3_MENU_1, /* 45 更换机油&机油滤清器*/
_MN_DSP_LEVEL3_3_MENU_2, /* 46 更换燃油滤清器*/
_MN_DSP_LEVEL3_3_MENU_3, /* 47 更换变速箱油*/
_MN_DSP_LEVEL3_3_MENU_4, /* 48 更换差速器油*/
_MN_DSP_LEVEL3_3_MENU_6, /* 49 更换动力转向液*/
_MN_DSP_LEVEL3_3_MENU_7, /* 50 轮胎换位・更换*/
_MN_DSP_LEVEL3_4_MENU_11, /* 51 设定日期-年*/
_MN_DSP_LEVEL3_4_MENU_12, /* 52 设定日期-月*/
_MN_DSP_LEVEL3_4_MENU_13, /* 53 设定日期-日*/
_MN_DSP_LEVEL3_4_MENU_21, /* 54 设定时间-时*/
_MN_DSP_LEVEL3_4_MENU_22, /* 55 设定时间-分*/
_MN_DSP_LEVEL3_4_MENU_3, /* 56 设定语言*/
_MN_DSP_LEVEL3_4_MENU_41, /* 57 速度设定-高速路*/
_MN_DSP_LEVEL3_4_MENU_42, /* 58 速度设定-一般路*/
_MN_DSP_LEVEL3_4_MENU_43, /* 59 发动机转速设定*/
_MN_DSP_LEVEL3_4_MENU_44, /* 60 急加速设定*/
_MN_DSP_LEVEL3_4_MENU_45, /* 61 急减速设定*/
_MN_DSP_LEVEL3_4_MENU_46, /* 62 长时间怠速设定*/
_MN_DSP_LEVEL3_4_MENU_47, /* 63 辅助驻车解除设定*/
_MN_DSP_LEVEL3_4_MENU_5, /* 64 轮胎匹配画面*/
_MN_DSP_LEVEL3_7_MENU_1, /* 65 亮度调节*/
/*四级菜单*/
_MN_DSP_LEVEL4_4_MENU_1, /* 64 速度设定-高速路*/
_MN_DSP_LEVEL4_4_MENU_2, /* 65 速度设定-一般路*/
_MN_DSP_LEVEL4_4_MENU_3, /* 66 发动机转速设定*/
_MN_DSP_LEVEL4_4_MENU_4, /* 67 急加速设定*/
_MN_DSP_LEVEL4_4_MENU_5, /* 68 急减速设定*/
_MN_DSP_LEVEL4_4_MENU_6, /* 69 长时间怠速设定*/
_MN_DSP_LEVEL4_4_MENU_7, /* 70 辅助驻车解除设定*/
_MN_DSP_LEVEL4_4_MENU_1, /* 66 速度设定-高速路*/
_MN_DSP_LEVEL4_4_MENU_2, /* 67 速度设定-一般路*/
_MN_DSP_LEVEL4_4_MENU_3, /* 68 发动机转速设定*/
_MN_DSP_LEVEL4_4_MENU_4, /* 69 急加速设定*/
_MN_DSP_LEVEL4_4_MENU_5, /* 70 急减速设定*/
_MN_DSP_LEVEL4_4_MENU_6, /* 71 长时间怠速设定*/
_MN_DSP_LEVEL4_4_MENU_7, /* 72 辅助驻车解除设定*/
/*特殊界面*/
_MN_DSP_ENTER_MENU, /* 71 确认*/
_MN_DSP_RETURN_MENU, /* 72 返回*/
_MN_DSP_LEVEL3_5_MENU_1, /* 73 LDWS 警报演示*/
_MN_DSP_LEVEL3_5_MENU_2, /* 74 AEBS第1警报演示*/
_MN_DSP_LEVEL3_5_MENU_3, /* 75 AEBS第2警报演示*/
_MN_DSP_LEVEL3_5_MENU_4, /* 76 AEBS全力制动警报演示*/
_MN_DSP_ENTER_MENU, /* 73 确认*/
_MN_DSP_RETURN_MENU, /* 74 返回*/
_MN_DSP_LEVEL3_5_MENU_1, /* 75 LDWS 警报演示*/
_MN_DSP_LEVEL3_5_MENU_2, /* 76 AEBS第1警报演示*/
_MN_DSP_LEVEL3_5_MENU_3, /* 77 AEBS第2警报演示*/
_MN_DSP_LEVEL3_5_MENU_4, /* 78 AEBS全力制动警报演示*/
/*工厂模式*/
_FAC_DSP_LEVEL1MENU_1, /* 79 DTC显示*/
_FAC_DSP_LEVEL1MENU_2, /* 80 DTC清除*/
_FAC_DSP_LEVEL1MENU_3, /* 81 仪表设定显示*/
_FAC_DSP_LEVEL1MENU_4, /* 82 暂时通常模式*/
_FAC_DSP_LEVEL1MENU_5, /* 83 结束工厂模式*/
_FAC_DSP_LEVEL1MENU_6, /* 84 HID自动水平初始化*/
_FAC_DSP_LEVEL1_1MENU_1, /* 85 发动机故障*/
_FAC_DSP_LEVEL1_1MENU_2, /* 86 SCR系统故障*/
_FAC_DSP_LEVEL1_1MENU_3, /* 87 EBS/ABS故障*/
_FAC_DSP_LEVEL1_1MENU_4, /* 88 仪表故障*/
_FAC_DSP_LEVEL1_2MENU_1, /* 89 清除所有DTC*/
_FAC_DSP_LEVEL1_2MENU_2, /* 90 清除所有DTC*/
_FAC_DSP_LEVEL1_3MENU_1, /* 91 L0-7 H2-A*/
_FAC_DSP_LEVEL1_3MENU_2, /* 92 L8-F H2-A*/
/*经销商模式*/
//_DIS_
} _MenuCode;
......
This diff is collapsed.
#include "RSCAN_Table.h"
#if 0
const canfd_filter_type RX_RULE_TABLE_LIST[33] = {
/* CAN 0 reception rules */
{0x000002E5ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x0000064Aul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x0000028Aul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x00000313ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x00000314ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x00000315ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x00000234ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x0000045Aul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x00000245ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x00000291ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x00000323ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x00000326ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x00000455ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x000003D2ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x00000328ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x00000329ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x000003B8ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x000003BBul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x000003ACul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x000003A6ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x000004A8ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x00000123ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x00000238ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x00000318ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x00000145ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x00000225ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x00000231ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x00000469ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x0000046Bul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x00000680ul, 0xDFFFFF80UL, 0x00000000ul, 0x00000200ul},
{0x000007DFul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x0000046Ful, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x00000743ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
};
#endif
const canfd_filter_type RX_RULE_TABLE_LIST[RX_RULE_SIZE] = {
/* CAN 0 reception rules */
{0x84FF021Aul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x8C010305ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x8CF00203ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x8CF00300ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x8CF00400ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x8CF02FA0ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x8CFE5A2Ful, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x8CFE6CEEul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x8CFF0F27ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x8CFF50F3ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x8CFF61F5ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x8CFF7A02ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x90FE6F2Aul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x90FF94DDul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x90FFDDF2ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x90FFF4F2ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x98CCAAEBul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x98F00000ul, 0xDFF00000UL, 0x00000000ul, 0x00000200ul},
{0x9CFE8100ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x9CFEAF00ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x9CFFEAF2ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x9CFFFEF2ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x98DA17FAul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
{0x98DBFFFAul, 0xDFFFFFFFUL, 0x00000000ul, 0x00000200ul},
#if 0
{0x98DA17FAul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98DBFFFAul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FFC825ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FFC325ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF3625ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF3325ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF3525ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x9CFFEAF2ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x9CFFFEF2ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x90FFF4F2ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FFF6F2ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x90FFDDF2ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF02E7ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FFDA21ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FFDC21ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FFDB21ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF1C7Aul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF14E8ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF9B3Aul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF9A19ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FD7E16ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FFF752ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x8CFE5A2Ful, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x8CF00300ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98F00010ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x8C010305ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FD9503ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x8CF00203ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98F00503ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x8CF00400ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF0800ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98F0000Ful, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x9CFEAF00ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FFFF00ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x9CFE8100ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FD7C00ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98F0010Bul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FDC40Bul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x90FE6F2Aul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x8CF02FA0ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x8CFF0F27ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF9727ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FD0700ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FFD09Eul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF9625ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF2227ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF107Aul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF1500ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF2A27ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF2B27ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF2C27ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF43F0ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x8CFF50F3ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF51F3ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF52F3ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x8CFF61F5ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF62F5ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF63F5ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x8CFF7A02ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF9F02ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF88DEul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF75F7ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x90FF94DDul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF9CE0ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF8503ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FFB970ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FFB971ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FFD916ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FFD462ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FFDE16ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF9627ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98F533A9ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x84FF021Aul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FF8238ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FFCEA4ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98CCAAEBul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x8CFE6CEEul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FEE6EEul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FEF3FDul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FEF433ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FEF533ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FE5B33ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FE4EECul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FEEA2Ful, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FEF100ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FE4F0Bul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FE4A03ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FEF803ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FEE400ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FEEE00ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FEE500ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FEE900ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FEF200ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FEF121ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FEBF0Bul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FEF500ul, 0xDFFFFFFFUL, 0x00000000ul, 0x00020000ul},
{0x98FECA00ul, 0xDFFFFF00UL, 0x00000000ul, 0x00020000ul},
{0x98FFE000ul, 0xDFFFF000UL, 0x00000000ul, 0x00020000ul},
#endif
};
\ No newline at end of file
#ifndef RSCAN_TABLE_H
#define RSCAN_TABLE_H
#include "r_typedefs.h"
/* structure */
typedef struct {
uint32_t data[4];
}canfd_filter_type;
#define RX_RULE_SIZE 24U
extern const canfd_filter_type RX_RULE_TABLE_LIST[RX_RULE_SIZE] ;
#endif
This diff is collapsed.
......@@ -118,11 +118,9 @@ Baud rate = 1 / [(Sync_Seg + Prop_Seg + Phase_Seg1 + Phase_Seg2) Tq)]
= Source Clock Freq / [PRESCALER * (1 + T_SEG1 + T_SEG2)]
******************************************************************************/
#define DIM( X ) (sizeof(X) / sizeof((X)[0]))
typedef void (*CAN0_Data_Ind_Func)(uint32_t Identifier, uint8_t DLC, uint8_t Data[]);
typedef void (*CAN1_Data_Ind_Func)(uint32_t Identifier, uint8_t DLC, uint8_t Data[]);
typedef void (*CAN2_Data_Ind_Func)(uint32_t Identifier, uint8_t DLC, uint8_t Data[]);
#define DIM(X) (sizeof(X) / sizeof((X)[0]))
typedef void (*CAN_Data_Ind_Func)(uint32_t Identifier, uint8_t DLC, uint8_t Data[]);
typedef void (*CAN_Data_Confirm_Func)(uint32_t Identifier, uint8_t TransferStatus);
typedef enum
{
CAN_Set_Complete = 0,
......@@ -147,33 +145,22 @@ typedef struct
typedef struct
{
CANFD_Filter_Cfg_st_t NM0StdFilter;
CANFD_Filter_Cfg_st_t Diag0StdFilter;
CANFD_Filter_Cfg_st_t Msg0StdFilter;
CANFD_Filter_Cfg_st_t NM0ExtFilter;
CANFD_Filter_Cfg_st_t Diag0ExtFilter;
CANFD_Filter_Cfg_st_t Msg0ExtFilter;
uint8_t CH0_Enable;
uint8_t CH0_Std_Ext;
CANFD_Filter_Cfg_st_t NM1StdFilter;
CANFD_Filter_Cfg_st_t Diag1StdFilter;
CANFD_Filter_Cfg_st_t Msg1StdFilter;
uint8_t CH1_Enable;
uint8_t CH1_Std_Ext;
CANFD_Filter_Cfg_st_t NM1ExtFilter;
CANFD_Filter_Cfg_st_t Diag1ExtFilter;
CANFD_Filter_Cfg_st_t Msg1ExtFilter;
uint8_t CH2_Enable;
uint8_t CH2_Std_Ext;
CANFD_Filter_Cfg_st_t NM2StdFilter;
CANFD_Filter_Cfg_st_t Diag2StdFilter;
CANFD_Filter_Cfg_st_t Msg2StdFilter;
CAN_Data_Ind_Func pfCAN0DataIndCb;
CAN_Data_Ind_Func pfCAN1DataIndCb;
CAN_Data_Ind_Func pfCAN2DataIndCb;
CANFD_Filter_Cfg_st_t NM2ExtFilter;
CANFD_Filter_Cfg_st_t Diag2ExtFilter;
CANFD_Filter_Cfg_st_t Msg2ExtFilter;
CAN0_Data_Ind_Func pfCAN0DataIndCb;
CAN1_Data_Ind_Func pfCAN1DataIndCb;
CAN2_Data_Ind_Func pfCAN2DataIndCb;
CAN_Data_Confirm_Func pfCAN0DataConfirmCb;
CAN_Data_Confirm_Func pfCAN1DataConfirmCb;
CAN_Data_Confirm_Func pfCAN2DataConfirmCb;
} CANFD_Filter_Init_st_t;
......@@ -235,12 +222,36 @@ typedef struct
volatile uint32_t Reserved : 6; /*!< Reserved bits */
} CANFD_ID_F3_st_t;
typedef struct stc_extid_filter
typedef union
{
uint32_t Msg;
CANFD_ID_F0_st_t st;
} CANFD_ID_F0_st_tt;
typedef union
{
uint32_t Msg;
CANFD_ID_F1_st_t st;
} CANFD_ID_F1_st_tt;
typedef union
{
CANFD_ID_F0_st_t F0_f; /*!< Message ID Filter Element for F0. See #stc_canfd_f0_t. */
CANFD_ID_F1_st_t F1_f; /*!< Message ID Filter Element for F1. See #stc_canfd_f1_t. */
CANFD_ID_F2_st_t F2_f; /*!< Message ID Filter Element for F2. See #stc_canfd_f2_t. */
CANFD_ID_F3_st_t F3_f; /*!< Message ID Filter Element for F3. See #stc_canfd_f3_t. */
uint32_t Msg;
CANFD_ID_F2_st_t st;
} CANFD_ID_F2_st_tt;
typedef union
{
uint32_t Msg;
CANFD_ID_F3_st_t st;
} CANFD_ID_F3_st_tt;
typedef struct stc_extid_filter
{
CANFD_ID_F0_st_tt F0_f; /*!< Message ID Filter Element for F0. See #stc_canfd_f0_t. */
CANFD_ID_F1_st_tt F1_f; /*!< Message ID Filter Element for F1. See #stc_canfd_f1_t. */
CANFD_ID_F2_st_tt F2_f; /*!< Message ID Filter Element for F2. See #stc_canfd_f2_t. */
CANFD_ID_F3_st_tt F3_f; /*!< Message ID Filter Element for F3. See #stc_canfd_f3_t. */
} CANFD_ID_Filter_st_t;
#define CANFD_CH0_MSG_RAM_ADDR ((uint32_t)(&RSCAN0) + 0x00000500UL)
......@@ -279,14 +290,9 @@ typedef struct
uint8_t Msg[8];
} CAN_Msg_t;
//#define usetx_buffer
#define userx_buffer
#define usetxrx_buffer
/******************************************************************************
Exported global variables and functions (to be accessed by other files)
******************************************************************************/
uint8_t CAN_Send_TxBuf0(uint32_t can_id, uint8_t dlc, uint8_t msg[8]);
uint8_t CAN_Receive_RxBuf0(uint32_t * p_can_id, uint8_t * p_dlc, uint8_t msg[8]);
void CANFD_SetTX_Abort(void);
uint8_t RSCAN0_SendCH0_TxBuf0(uint32_t can_id, uint8_t dlc, uint8_t ide, uint8_t msg[8]);
uint8_t RSCAN0_SendCH0_TxBuf1(uint32_t can_id, uint8_t dlc, uint8_t ide, uint8_t msg[8]);
......@@ -305,32 +311,38 @@ uint8_t RSCAN0_SendCH0_TxBuf13(uint32_t can_id, uint8_t dlc, uint8_t ide, uint8_
uint8_t RSCAN0_SendCH0_TxBuf14(uint32_t can_id, uint8_t dlc, uint8_t ide, uint8_t msg[8]);
uint8_t RSCAN0_SendCH0_TxBuf15(uint32_t can_id, uint8_t dlc, uint8_t ide, uint8_t msg[8]);
uint8_t CAN0_Receive_FIFOBuf0(void);
uint32_t Get_CAN0_Status(void);
uint8_t Get_CAN0_TxBuf1_Status(void);
void CAN0_Channel0_To_StopMode(void);
extern void RSCAN0_Init( void );
void RSCAN0_CH_Init (CANFD_Filter_Init_st_t *pFilterInit , uint32_t IDFilterNum);
extern void RSCan0_CH0_Write(CAN_Msg_t * Msg);
extern uint8_t CAN0_Receive_FIFO7(void);
extern void RSCAN0_Init(void);
void RSCAN0_CH_Init(CANFD_Filter_Init_st_t *pFilterInit, uint32_t IDFilterNum);
extern void RSCan0_CH0_Write(CAN_Msg_t *Msg);
extern uint8_t Get_CH0_ErrPassiveStatus(void);
extern void RSCAN0_FIFO_Rx_ISR(void);
extern void RSCAN0_CH0_Tx_ISR(void);
CAN_SetState CAN_CH0_Data_Request( uint32_t Identifier, uint8_t MsgStd, uint8_t MsgRTR, uint8_t DLC, uint8_t *Data );
extern void RSCAN0_CH0_Tx_ISR(void);
extern void RSCAN0_CH0_Rx_ISR(void);
extern void RSCAN0_CH0_Err_ISR(void);
extern uint8_t Get_CH0_BusOffStatus(void);
extern void CH0_BusOff_Recovery(void);
extern void RSCAN0_CH0_Wakeup_ISR(void);
extern CAN_SetState CAN_CH0_Data_Request(uint32_t Identifier, uint8_t MsgStd, uint8_t MsgRTR, uint8_t DLC, uint8_t *Data);
extern uint8_t Get_CH0_BusOffStatus(void);
extern void RSCAN0_CH1_Err_ISR(void);
extern void RSCAN0_CH2_Err_ISR(void);
extern void RSCAN0_CH1_Rx_ISR(void);
extern void RSCAN0_CH2_Rx_ISR(void);
extern void RSCAN0_CH1_Tx_ISR(void);
extern void RSCAN0_CH1_Rx_ISR(void);
extern void RSCAN0_CH1_Err_ISR(void);
extern void RSCAN0_CH2_Tx_ISR(void);
extern void RSCAN0_CH2_Rx_ISR(void);
extern void RSCAN0_CH2_Err_ISR(void);
uint8_t Get_CH0_RecStatus(void);
uint8_t Rscan_TEC_Counter(void);
uint8_t Rscan_REC_Counter(void);
void CAN0_Global_To_StopMode(void);
void CAN0_Channel0_To_StopMode(void);
void CAN0_Channel0_To_CommunicationMode(void);
void CAN0_Global_To_NORMAL(void);
#endif
......@@ -43,17 +43,17 @@ uint32_t g_u32EEPROMBlock10Buffer[EEPROM_BLOCK10_BUFFER_SIZE / 4U];
static const EEPROM_Block_st_t g_stEEPROMBlockTable[] =
{
/* u32StartAddr u32EndAddr u32DataSize pu32DataBuffer */
{0xFF200000UL, 0xFF20007FUL, EEPROM_BLOCK0_BUFFER_SIZE, g_u32EEPROMBlock0Buffer,},
{0xFF200080UL, 0xFF2000FFUL, EEPROM_BLOCK1_BUFFER_SIZE, g_u32EEPROMBlock1Buffer,},
{0xFF200100UL, 0xFF2002FFUL, EEPROM_BLOCK2_BUFFER_SIZE, g_u32EEPROMBlock2Buffer,},
{0xFF200300UL, 0xFF2004FFUL, EEPROM_BLOCK3_BUFFER_SIZE, g_u32EEPROMBlock3Buffer,},
{0xFF200500UL, 0xFF20057FUL, EEPROM_BLOCK4_BUFFER_SIZE, g_u32EEPROMBlock4Buffer,},
{0xFF200580UL, 0xFF20067FUL, EEPROM_BLOCK5_BUFFER_SIZE, g_u32EEPROMBlock5Buffer,},
{0xFF200680UL, 0xFF200A7FUL, EEPROM_BLOCK6_BUFFER_SIZE, g_u32EEPROMBlock6Buffer,},
{0xFF200A80UL, 0xFF200F7FUL, EEPROM_BLOCK7_BUFFER_SIZE, g_u32EEPROMBlock7Buffer,},
{0xFF200F80UL, 0xFF20377FUL, EEPROM_BLOCK8_BUFFER_SIZE, g_u32EEPROMBlock8Buffer,},
{0xFF203780UL, 0xFF2037FFUL, EEPROM_BLOCK9_BUFFER_SIZE, g_u32EEPROMBlock9Buffer,},
{0xFF203800UL, 0xFF2038FFUL, EEPROM_BLOCK10_BUFFER_SIZE, g_u32EEPROMBlock10Buffer,},
{0xFF200000UL, 0xFF20007FUL, EEPROM_BLOCK0_BUFFER_SIZE, g_u32EEPROMBlock0Buffer,}, /*EEPROM_BLOCK_UDS_FLAG*/
{0xFF200080UL, 0xFF2000FFUL, EEPROM_BLOCK1_BUFFER_SIZE, g_u32EEPROMBlock1Buffer,}, /*EEPROM_BLOCK_UDS_S27*/
{0xFF200100UL, 0xFF2002FFUL, EEPROM_BLOCK2_BUFFER_SIZE, g_u32EEPROMBlock2Buffer,}, /*EEPROM_BLOCK_UDS_S2E0*/
{0xFF200300UL, 0xFF2004FFUL, EEPROM_BLOCK3_BUFFER_SIZE, g_u32EEPROMBlock3Buffer,}, /*EEPROM_BLOCK_UDS_S2E*/
{0xFF200500UL, 0xFF20057FUL, EEPROM_BLOCK4_BUFFER_SIZE, g_u32EEPROMBlock4Buffer,}, /*EEPROM_BLOCK_UDS_CONFIG*/
{0xFF200580UL, 0xFF20067FUL, EEPROM_BLOCK5_BUFFER_SIZE, g_u32EEPROMBlock5Buffer,}, /*EEPROM_BLOCK_UDS_DTC*/
{0xFF200680UL, 0xFF200A7FUL, EEPROM_BLOCK6_BUFFER_SIZE, g_u32EEPROMBlock6Buffer,}, /*EEPROM_BLOCK_ODO*/
{0xFF200A80UL, 0xFF200F7FUL, EEPROM_BLOCK7_BUFFER_SIZE, g_u32EEPROMBlock7Buffer,}, /*EEPROM_BLOCK_ODO_STAMP*/
{0xFF200F80UL, 0xFF20377FUL, EEPROM_BLOCK8_BUFFER_SIZE, g_u32EEPROMBlock8Buffer,}, /*EEPROM_BLOCK_TRIP_STAMP*/
{0xFF203780UL, 0xFF2037FFUL, EEPROM_BLOCK9_BUFFER_SIZE, g_u32EEPROMBlock9Buffer,}, /*EEPROM_BLOCK_SERVICE_INFO*/
{0xFF203800UL, 0xFF2038FFUL, EEPROM_BLOCK10_BUFFER_SIZE, g_u32EEPROMBlock10Buffer,}, /*EEPROM_BLOCK_EOL_K_LINE*/
};
/****************************************************************************
......
......@@ -10,8 +10,8 @@ typedef union
{
uint16_t u16Index;
uint16_t u16IndexInv;
}stField;
}EEPROM_Ctrl_Data_un_t;
} stField;
} EEPROM_Ctrl_Data_un_t;
typedef struct
{
......@@ -20,7 +20,7 @@ typedef struct
uint16_t u16ProgLen;
uint32_t u32ProgAddr;
uint32_t* pu32ProgData;
}EEPROM_Access_Ctrl_st_t;
} EEPROM_Access_Ctrl_st_t;
......@@ -213,7 +213,7 @@ void EEPROM_Access_Init(const EEPROM_Block_st_t * pstBlockTable,
EEPROM_Ctrl_Data_un_t unCtrlData;
if ((pstBlockTable != NULL) && (pstBlockAccess != NULL) &&\
if ((pstBlockTable != NULL) && (pstBlockAccess != NULL) && \
(pstMediaAccess != NULL) && (u16BlockNum != 0U))
{
/*** Step 1 : Setup media(data flash) access functions ***/
......@@ -458,7 +458,7 @@ void EEPROM_Access_Init(const EEPROM_Block_st_t * pstBlockTable,
u16Result = u16IndexBkup + (0xFFFFU - u16Index) + 1U;
}
if ((u16Result <= u16MaxRecordNum[0U] + u16MaxRecordNum[1U]) &&\
if ((u16Result <= u16MaxRecordNum[0U] + u16MaxRecordNum[1U]) && \
(u16Result <= EEPROM_OVER_SEARCH_RECORD_NUM))
{
if (u16RecordNum == 0U) /* Cross sector access */
......@@ -504,7 +504,8 @@ void EEPROM_Access_Init(const EEPROM_Block_st_t * pstBlockTable,
g_pstEEPROMBlock[i].u8Status = EEPROM_BLOCK_ERROR;
}
}
}while(u8Loop);
}
while (u8Loop);
}
}
}
......
......@@ -142,7 +142,7 @@ void Sys_Run_Mode_10ms_Tasks(void)
Popup_Alone_Sound_Server();
Telltales_Left_Right_Management_Service();
Telltales_Management();
// Test_LED_AllLight();
//Test_LED_AllLight();
Key_Service();
CAN_BUSOFF_Recover();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment