Commit 5b45145d authored by 郑萍's avatar 郑萍

Merge branch 'yedea_RS485' of...

Merge branch 'yedea_RS485' of http://tyw-server.synology.me:12345/chenjiale/jiancetai into yadea_C011_jiancetai_z
parents e260a633 9ab5af10
......@@ -3,14 +3,175 @@
void R485_Send_0x40(void)
{
memset(R485_ID40h.Msg, 0, 64);
switch (HJ_OtherKeyCurrent.count)
{
case 0:
R485_ID40h.Sig.BackupZoneMainSoftwareVer = 1;
R485_ID40h.Sig.BOOTSoftwareUnderlyingVer = 1;
R485_ID40h.Sig.FlowCode4th = 1;
R485_ID40h.Sig.ProductModel1 = 1;
break;
case 1:
R485_ID40h.Sig.BackupZoneMainSoftwareVer = 0;
R485_ID40h.Sig.BOOTSoftwareUnderlyingVer = 0;
R485_ID40h.Sig.FlowCode4th = 0;
R485_ID40h.Sig.ProductModel1 = 0;
break;
case 2:
R485_ID40h.Sig.BackupZoneMainSoftwareVer = 1;
R485_ID40h.Sig.BOOTSoftwareUnderlyingVer = 1;
R485_ID40h.Sig.FlowCode4th = 1;
R485_ID40h.Sig.ProductModel1 = 1;
break;
case 3:
R485_ID40h.Sig.BackupZoneMainSoftwareVer = 0;
R485_ID40h.Sig.BOOTSoftwareUnderlyingVer = 0;
R485_ID40h.Sig.FlowCode4th = 0;
R485_ID40h.Sig.ProductModel1 = 0;
break;
case 4:
R485_ID40h.Sig.BackupZoneMainSoftwareVer = 1;
R485_ID40h.Sig.BOOTSoftwareUnderlyingVer = 1;
R485_ID40h.Sig.FlowCode4th = 1;
R485_ID40h.Sig.ProductModel1 = 1;
break;
case 5:
R485_ID40h.Sig.BackupZoneMainSoftwareVer = 0;
R485_ID40h.Sig.BOOTSoftwareUnderlyingVer = 0;
R485_ID40h.Sig.FlowCode4th = 0;
R485_ID40h.Sig.ProductModel1 = 0;
break;
case 6:
R485_ID40h.Sig.BackupZoneMainSoftwareVer = 1;
R485_ID40h.Sig.BOOTSoftwareUnderlyingVer = 1;
R485_ID40h.Sig.FlowCode4th = 1;
R485_ID40h.Sig.ProductModel1 = 1;
break;
case 7:
R485_ID40h.Sig.BackupZoneMainSoftwareVer = 0;
R485_ID40h.Sig.BOOTSoftwareUnderlyingVer = 0;
R485_ID40h.Sig.FlowCode4th = 0;
R485_ID40h.Sig.ProductModel1 = 0;
break;
case 8:
R485_ID40h.Sig.BackupZoneMainSoftwareVer = 1;
R485_ID40h.Sig.BOOTSoftwareUnderlyingVer = 1;
R485_ID40h.Sig.FlowCode4th = 1;
R485_ID40h.Sig.ProductModel1 = 1;
break;
case 9:
break;
default:
break;
}
R485_Send(0x40, R485_ID40h.Msg, sizeof(R485_ID40h.Msg));
}
void R485_Send_0x41(void)
{
memset(R485_ID41h.Msg, 0, 64);
R485_ID41h.Sig.AlarmStatus = 1;
R485_ID41h.Sig.ALMCommunicationStatus = 1;
switch (HJ_OtherKeyCurrent.count)
{
case 0:
break;
case 1:
R485_ID41h.Sig.ICMCalculatesVehicleSpeed = 0; //速度 = (X * 0.512 * 3.14 * 1.05) / 30
R485_ID41h.Sig.TotalBatterySOC = 0x2; //电量
R485_ID41h.Sig.VehicleStatus = 0x3; //整车状态
R485_ID41h.Sig.SpeedGear = 0x2; //挡位
//功率暂空一会做
R485_ID41h.Sig.IOTRealTime_Hour = 0; //时间:时
R485_ID41h.Sig.IOTRealTime_Minute = 0; //时间:分
R485_ID41h.Sig.IOTRealTime_Second = 0; //时间:秒
break;
case 2:
R485_ID41h.Sig.ICMCalculatesVehicleSpeed = 0xC3; //速度 = (X * 0.512 * 3.14 * 1.05) / 30
R485_ID41h.Sig.TotalBatterySOC = 0x1E; //电量
R485_ID41h.Sig.VehicleStatus = 0x3; //整车状态
R485_ID41h.Sig.SpeedGear = 0x3; //挡位
//功率暂空一会做
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x1; // 自动大灯
R485_ID41h.Sig.IOTRealTime_Hour = 0xB; //时间:时
R485_ID41h.Sig.IOTRealTime_Minute = 0xB; //时间:分
R485_ID41h.Sig.IOTRealTime_Second = 0; //时间:秒
break;
case 3:
R485_ID41h.Sig.ICMCalculatesVehicleSpeed = 0x186; //速度 = (X * 0.512 * 3.14 * 1.05) / 30
R485_ID41h.Sig.TotalBatterySOC = 0x2C; //电量
R485_ID41h.Sig.VehicleStatus = 0x3; //整车状态
R485_ID41h.Sig.SpeedGear = 0x1; //挡位
//功率暂空一会做
R485_ID41h.Sig.IOTRealTime_Hour = 0x16; //时间:时
R485_ID41h.Sig.IOTRealTime_Minute = 0x16; //时间:分
R485_ID41h.Sig.IOTRealTime_Second = 0; //时间:秒
break;
case 4:
R485_ID41h.Sig.ICMCalculatesVehicleSpeed = 0x240; //速度 = (X * 0.512 * 3.14 * 1.05) / 30
R485_ID41h.Sig.TotalBatterySOC = 0x42; //电量
R485_ID41h.Sig.VehicleStatus = 0x3; //整车状态
R485_ID41h.Sig.SpeedGear = 0x0; //挡位
//功率暂空一会做
R485_ID41h.Sig.IOTRealTime_Hour = 0xD; //时间:时
R485_ID41h.Sig.IOTRealTime_Minute = 21; //时间:分
R485_ID41h.Sig.IOTRealTime_Second = 0; //时间:秒
break;
case 5:
R485_ID41h.Sig.ICMCalculatesVehicleSpeed = 0xC3; //速度 = (X * 0.512 * 3.14 * 1.05) / 30
R485_ID41h.Sig.TotalBatterySOC = 0x1E; //电量
R485_ID41h.Sig.VehicleStatus = 0x1; //整车状态
R485_ID41h.Sig.SpeedGear = 0x3; //挡位
//功率暂空一会做
R485_ID41h.Sig.IOTRealTime_Hour = 0; //时间:时
R485_ID41h.Sig.IOTRealTime_Minute = 0; //时间:分
R485_ID41h.Sig.IOTRealTime_Second = 0; //时间:秒
break;
case 6:
R485_ID41h.Sig.ICMCalculatesVehicleSpeed = 0xC3; //速度 = (X * 0.512 * 3.14 * 1.05) / 30
R485_ID41h.Sig.TotalBatterySOC = 0x1E; //电量
R485_ID41h.Sig.VehicleStatus = 0x1; //整车状态
R485_ID41h.Sig.SpeedGear = 0x3; //挡位
//功率暂空一会做
R485_ID41h.Sig.IOTRealTime_Hour = 0; //时间:时
R485_ID41h.Sig.IOTRealTime_Minute = 0; //时间:分
R485_ID41h.Sig.IOTRealTime_Second = 0; //时间:秒
break;
case 7:
R485_ID41h.Sig.ICMCalculatesVehicleSpeed = 0xC3; //速度 = (X * 0.512 * 3.14 * 1.05) / 30
R485_ID41h.Sig.TotalBatterySOC = 0x1E; //电量
R485_ID41h.Sig.VehicleStatus = 0x1; //整车状态
R485_ID41h.Sig.SpeedGear = 0x3; //挡位
//功率暂空一会做
R485_ID41h.Sig.IOTRealTime_Hour = 0; //时间:时
R485_ID41h.Sig.IOTRealTime_Minute = 0; //时间:分
R485_ID41h.Sig.IOTRealTime_Second = 0; //时间:秒
break;
case 8:
R485_ID41h.Sig.ICMCalculatesVehicleSpeed = 0xC3; //速度 = (X * 0.512 * 3.14 * 1.05) / 30
R485_ID41h.Sig.TotalBatterySOC = 0x1E; //电量
R485_ID41h.Sig.VehicleStatus = 0x1; //整车状态
R485_ID41h.Sig.SpeedGear = 0x3; //挡位
//功率暂空一会做
R485_ID41h.Sig.IOTRealTime_Hour = 0; //时间:时
R485_ID41h.Sig.IOTRealTime_Minute = 0; //时间:分
R485_ID41h.Sig.IOTRealTime_Second = 0; //时间:秒
break;
case 9:
R485_ID41h.Sig.ICMCalculatesVehicleSpeed = 0xC3; //速度 = (X * 0.512 * 3.14 * 1.05) / 30
R485_ID41h.Sig.TotalBatterySOC = 0x1E; //电量
R485_ID41h.Sig.VehicleStatus = 0x1; //整车状态
R485_ID41h.Sig.SpeedGear = 0x3; //挡位
//功率暂空一会做
R485_ID41h.Sig.IOTRealTime_Hour = 0; //时间:时
R485_ID41h.Sig.IOTRealTime_Minute = 0; //时间:分
R485_ID41h.Sig.IOTRealTime_Second = 0; //时间:秒
break;
case 10:
break;
default:
break;
}
R485_Send(0x41, R485_ID41h.Msg, sizeof(R485_ID41h.Msg));
}
......
......@@ -203,42 +203,110 @@ void Api_GPIO_Init(void)
}
void ApiPowerSupply(void)
void Line_Temp(void)
{
//�ϵ�ʱ��
//DelayMs(6);//6ms
P_VCC4V2_EN_NEW(PortGpioLow);// P1_25 Pin97
//DelayMs(1000);//125ms
P_3V3MCU_EN(PortGpioHigh);//64pin 104
//DelayMs(1500);//1500ms
P_VCC3V3_EN(PortGpioHigh);//106pin 200
//DelayMs(2);//1ms
F_LCD_RESET(PortGpioHigh);//103pin 129
F_LCD_STBYB(PortGpioHigh);//6pin 004
//DelayMs(1);
P_1531_EN(PortGpioHigh);
//DelayMs(115);//115ms
P_61194_EN(PortGpioHigh);//125pin 213
P_APOWER_OUT(PortGpioHigh);//91pin 119
NEW_F_Sound_EN(PortGpioHigh);//����ʹ��
P_BD12_EN(PortGpioHigh);
P_TPA6211_EN(PortGpioHigh);
switch (HJ_OtherKeyCurrent.count)
{
case 0:
LINE_LampLowON;
LINE_LampHighOFF;
LINE_weizhiOFF;
LINE_TurnLeftOFF;
LINE_TurnRightOFF;
LINE_ABSOFF;
LINE_BLEOFF;
break;
case 1:
LINE_LampLowOFF;
LINE_LampHighON;
LINE_weizhiOFF;
LINE_TurnLeftON;
LINE_TurnRightOFF;
LINE_ABSOFF;
LINE_BLEOFF;
break;
case 2:
LINE_LampLowON;
LINE_LampHighOFF;
LINE_weizhiON;
LINE_TurnLeftOFF;
LINE_TurnRightON;
LINE_ABSOFF;
LINE_BLEOFF;
break;
case 3:
LINE_LampLowON;
LINE_LampHighOFF;
LINE_weizhiOFF;
LINE_TurnLeftOFF;
LINE_TurnRightOFF;
LINE_ABSOFF;
LINE_BLEOFF;
break;
case 4:
LINE_LampLowON;
LINE_LampHighOFF;
LINE_weizhiOFF;
LINE_TurnLeftOFF;
LINE_TurnRightOFF;
LINE_ABSOFF;
LINE_BLEOFF;
break;
case 5:
LINE_LampLowON;
LINE_LampHighOFF;
LINE_weizhiOFF;
LINE_TurnLeftOFF;
LINE_TurnRightOFF;
LINE_ABSOFF;
LINE_BLEOFF;
break;
case 6:
LINE_LampLowON;
LINE_LampHighOFF;
LINE_weizhiOFF;
LINE_TurnLeftOFF;
LINE_TurnRightOFF;
LINE_ABSON;
LINE_BLEOFF;
break;
case 7:
LINE_LampLowON;
LINE_LampHighOFF;
LINE_weizhiOFF;
LINE_TurnLeftOFF;
LINE_TurnRightOFF;
LINE_ABSOFF;
LINE_BLEON;
break;
case 8:
LINE_LampLowON;
LINE_LampHighOFF;
LINE_weizhiOFF;
LINE_TurnLeftOFF;
LINE_TurnRightOFF;
LINE_ABSOFF;
LINE_BLEOFF;
break;
case 9:
LINE_LampLowON;
LINE_LampHighON;
LINE_weizhiON;
LINE_TurnLeftON;
LINE_TurnRightON;
LINE_ABSON;
LINE_BLEON;
break;
default:
LINE_LampLowON;
LINE_LampHighOFF;
LINE_weizhiOFF;
LINE_TurnLeftOFF;
LINE_TurnRightOFF;
LINE_ABSOFF;
LINE_BLEOFF;
break;
}
}
......@@ -138,8 +138,28 @@ extern en_port_gpio_level_t BUTTON_GND_Signal3_IN;
extern en_port_gpio_level_t Can1Rx_IN;
#define GET_CAN1_RX_IN_LEVEL Port_GetPortPinLevel(0, 27, &Can1Rx_IN)
#define LINE_LampLowON Port_SetPortPinLevel(2,5,PortGpioHigh)
#define LINE_LampLowOFF Port_SetPortPinLevel(2,5,PortGpioLow)
#define LINE_LampHighON Port_SetPortPinLevel(2,0,PortGpioHigh)
#define LINE_LampHighOFF Port_SetPortPinLevel(2,0,PortGpioLow)
#define LINE_weizhiON Port_SetPortPinLevel(1,25,PortGpioHigh)
#define LINE_weizhiOFF Port_SetPortPinLevel(1,25,PortGpioLow)
#define LINE_TurnLeftON Port_SetPortPinLevel(2,27,PortGpioLow)
#define LINE_TurnLeftOFF Port_SetPortPinLevel(2,27,PortGpioHigh)
#define LINE_TurnRightON Port_SetPortPinLevel(2,29,PortGpioLow)
#define LINE_TurnRightOFF Port_SetPortPinLevel(2,29,PortGpioHigh)
#define LINE_ABSON Port_SetPortPinLevel(1,24,PortGpioHigh)
#define LINE_ABSOFF Port_SetPortPinLevel(1,24,PortGpioLow)
#define LINE_BLEON Port_SetPortPinLevel(1,24,PortGpioHigh)
#define LINE_BLEOFF Port_SetPortPinLevel(1,24,PortGpioLow)
extern void Api_GPIO_Init(void);
extern void ApiPowerSupply(void);
extern void Line_Temp(void);
#endif /* API_IOCONFIG_H_ */
//
This diff is collapsed.
......@@ -821,8 +821,8 @@ void CANInit(void)
g_UI_Language = NewData.Data2;
#endif
g_UI_SWHW = NewData.Data3;
UART_PORT_init();
UART_init();
// UART_PORT_init();
// UART_init();
HU_USM_E_04.CF_AVN_CluVoiceVolume = 0x3;
BarcodePartNumOffect = 14;
// Mfs_Uart_Write(UART0_Type, StartBuf, 8, TRUE);
......
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\S6J3360_template_iar_ewarm.pbd.linf
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\adc12b.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\adc12b_driver.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\api_adc.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\api_can_2nd.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\api_can_3rd.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\api_capture.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\api_RS485.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\api_timer.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\api_workflash.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\app_tft.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_app_AUTO.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_app_ELSE.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_app_END.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_app_EOL.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_app_led_output.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_app_led_QX23.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_app_tft_output.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_bd8379.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_bt_rlt.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_bt_rlt_driver.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_button.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_ddrhsspi.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_dma.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_eeprom_Interface.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_eic.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_mfs_uart.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_mfs_uart_driver.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_motor.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_port.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_Presskey.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_pwm.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_rtc.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_speed_check.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_sysctrl.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bsp_system.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\bt_pwm_driver.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\can.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\can_2nd.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\can_3rd.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\CAN_CFG.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\canfd_320_driver.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\cpu.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\DCC_Write.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\DTC.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\exceptions.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\hsspi_flash.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\interrupts.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\io_config.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\JLINKDCC_Process.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\LCD_BUS_Interface.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\LCD_C035QAN02.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\main.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\MM_Can_TP.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\NM_Interface.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\NM_protocol.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\ProjectConfig.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\PWM.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\R485_Communication_Matrix.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\ScanQrCodeConfig.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\sound.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\start.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\tcflash.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\Traveo_template_version.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\UDS_Service.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\workflash.pbi
D:\share\yedeą\jiancetai\tools\iar_ewarm\standalone_tcflash\objs\WorkFlashInterFace.pbi
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