Commit e9ea20dd authored by 王佳伟's avatar 王佳伟

feat:红绿蓝每一个颜色后面增加5秒黑色

parent b31f1adb
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
This diff is collapsed.
This diff is collapsed.
......@@ -20,8 +20,8 @@ output\project.out: ..\source\System\dr7f701684.ld \
C:\ghs\comp_rh850\lib\rh850\libstartup.a \
C:\ghs\comp_rh850\lib\rh850\libsys.a C:\ghs\comp_rh850\lib\rh850\libarch.a
:cmdList=gmemfile output/project.out -o output/FX12_TFT_test.mem ; gsrec -e 0 -hex386 output/project.out -o output/FX12_TFT_test.hex ; gsrec -e 0 -noS5 output/project.out -o output/FX12_TFT_test.rec ; ccv850 $(FILETYPEOPTIONS) $(OBJECTS) -MD -I..\source\Driver\Clock -I..\source\Driver\RH850F1KM_S1 -I..\source\Driver\Timer -I..\source\Driver\TimerB -I..\source\Driver\Analog_Signals -I..\source\Driver\CAN -I..\source\Driver\GPIO -I..\source\System -I..\source\Appliciation -I..\source\FCL -I..\source\EEL -I..\source\eel_user -I..\source\fdl_user -I..\source\FDL -I..\source\EEL\lib -I..\source\FDL\lib -object_dir=.\obj -map -gsize -e _RESET -Mx -bsp generic -callgraph -dwarf2 -D__GHS__ -cpu=rh850g3kh -fhard -DPlatform_RH850 -DPlatform_32Bit -nothreshold -g --diag_suppress 1 --diag_suppress 9 --diag_suppress 177 --diag_suppress 550 --diag_suppress 188 -registermode=32 -data_bus_width=32 -Onone -japanese_automotive_c -top_project Z:\D\test\393_TEST\ghs\project.gpj -o output\project.out ;
:cmdHash=0xfcb36fb3
:cmdList=gmemfile output/project.out -o output/FX12_TFT_test.mem ; gsrec -e 0 -hex386 output/project.out -o output/FX12_TFT_test.hex ; gsrec -e 0 -noS5 output/project.out -o output/FX12_TFT_test.rec ; ccv850 $(FILETYPEOPTIONS) $(OBJECTS) -MD -I..\source\Driver\Clock -I..\source\Driver\RH850F1KM_S1 -I..\source\Driver\Timer -I..\source\Driver\TimerB -I..\source\Driver\Analog_Signals -I..\source\Driver\CAN -I..\source\Driver\GPIO -I..\source\System -I..\source\Appliciation -I..\source\FCL -I..\source\EEL -I..\source\eel_user -I..\source\fdl_user -I..\source\FDL -I..\source\EEL\lib -I..\source\FDL\lib -object_dir=.\obj -map -gsize -e _RESET -Mx -bsp generic -callgraph -dwarf2 -D__GHS__ -cpu=rh850g3kh -fhard -DPlatform_RH850 -DPlatform_32Bit -nothreshold -g --diag_suppress 1 --diag_suppress 9 --diag_suppress 177 --diag_suppress 550 --diag_suppress 188 -registermode=32 -data_bus_width=32 -Onone -japanese_automotive_c -top_project Z:\D\װ\c928&G393\g393\ghs\project.gpj -o output\project.out ;
:cmdHash=0x810b8349
:objList=obj\RTE_PWM.o obj\RTE_WDT.o obj\Internal_EEPROM.o obj\RTE_Memory.o obj\Internal_FCL.o obj\Clock.o obj\WDT.o obj\rh850_macros.o obj\Sys_Tick.o obj\ADC.o obj\Analog_Circuits.o obj\Analog_Signals.o obj\TimerB.o obj\RSCAN_Table.o obj\RSCAN.o obj\GPIO.o obj\UART.o obj\RIIC.o obj\Simulated_8080.o obj\TFT_LCD.o obj\TM035HFZGZx.o obj\r_clkc.o obj\fcl_ctrl.o ..\source\System\dr7f701684.ld obj\init.o obj\interrupts.o obj\main.o obj\dr7f701684_startup.o obj\r_fcl_hw_access_asm.o obj\r_fcl_hw_access.o obj\r_fcl_user_if.o obj\fcl_descriptor.o obj\fcl_user.o obj\fdl_descriptor.o obj\fdl_user.o obj\r_fdl_hw_access.o obj\r_fdl_user_if.o obj\r_fdl_user_if_init.o obj\eel_descriptor.o obj\eelapp_control.o obj\r_eel_basic_fct.o obj\r_eel_user_if.o obj\BSP.o obj\TimeStamp.o obj\RH850_OTA.o obj\fx12_test.o obj\Display_Info.o ;
:objHash=0x839e93ac
......
No preview for this file type
------------------------------------------------
dle output started at: Wed Aug 05 13:15:23 2020
------------------------------------------------
dblink = "C:\ghs\comp_rh850\dblink"
------------------------------------------------
argv[0] = "C:\ghs\comp_rh850\dblink.exe"
argv[1] = "-dbopath=obj"
argv[2] = "-a"
argv[3] = "-nm=gnm"
argv[4] = "C:\Users\ADMINI~1\AppData\Local\Temp\gh_00003801.nm"
argv[5] = "-o"
argv[6] = "output\project.dnm"
argv[7] = "-top_project"
argv[8] = "Z:\D\װ\c928&G393\g393\ghs\project.gpj"
argv[9] = "-Dscope.target=v800/generic/standalone"
argv[10] = "-Dscope.processor=800"
argv[11] = "-Dscope.cpuname=rh850g3kh"
argv[12] = "-Dscope.fputype=hard"
argv[13] = "-Dscope.tools_dir=C:\ghs\comp_rh850"
argv[14] = "-Dscope.deflibdir=C:\ghs\comp_rh850\lib\rh850"
argv[15] = "C:\ghs\comp_rh850\lib\rh850\crt0.dbo"
argv[16] = "C:\ghs\comp_rh850\lib\rh850\libarena_malloc.dba"
argv[17] = "C:\ghs\comp_rh850\lib\rh850\libwchar_s32.dba"
argv[18] = "C:\ghs\comp_rh850\lib\rh850\libansi.dba"
argv[19] = "C:\ghs\comp_rh850\lib\rh850\libwc_s32.dba"
argv[20] = "C:\ghs\comp_rh850\lib\rh850\libmath_fp.dba"
argv[21] = "C:\ghs\comp_rh850\lib\rh850\libind_fp.dba"
argv[22] = "C:\ghs\comp_rh850\lib\rh850\libstartup.dba"
argv[23] = "C:\ghs\comp_rh850\lib\rh850\libsys.dba"
argv[24] = "C:\ghs\comp_rh850\lib\rh850\libarch.dba"
------------------------------------------------
dblink: WARNING: could not find .dbo for "Z:\D\test\393_TEST\ghs\obj\BSP.dlo" with magic="..bof.Z.3A.5CD.5Ctest.5C393_TEST.5Cghs.5Cobj.5CBSP...5A.3A.5CD.5Ctest.5C393_TEST.5Cghs..5F2A39D3..0". Source level debugging will not be available for this object.
dblink: WARNING: during processing, some .dbo files were not found. Use the "-dbo_trace" option to diagnose.
No preview for this file type
This diff is collapsed.
This diff is collapsed.
No preview for this file type
output\project.out .intvect 1944
output\project.out .rodata 18445
output\project.out .text 78862
output\project.out .rodata 19925
output\project.out .text 80670
output\project.out .R_FCL_CODE_ROM 894
output\project.out .R_FCL_CONST 19
output\project.out .R_FCL_CODE_USR 246
......@@ -13,4 +13,4 @@ output\project.out .R_EEL_Text 18394
output\project.out .R_EEL_Const 43
output\project.out .secinfo 120
output\project.out .syscall 6
output\project.out .romdata 385
output\project.out .romdata 473
......@@ -107,8 +107,19 @@ int BSP_GPIO_Get_948_lock(void)
//---------------------------------------------------------------------------
// 1ms定时器中断服务函数
static uint8_t time_count = 1;
static uint8_t pwm_count = 1;
void BSP_FTM0_IRQHandler(void)
{
pwm_count++;
if(pwm_count>=0&&pwm_count<=9)
{
GPIO_OUT_PORT08_PIN09 =1;
}
else
{
pwm_count =0;
GPIO_OUT_PORT08_PIN09 =0;
}
if (time_count < 20)
{
time_count++;
......@@ -684,7 +695,7 @@ void switch_951_Color(uint8_t in)
{
switch (in)
{
case 0:
case 0://白
AIM951_i2c_send(0xFF, 0x01);
BSP_Delay_ms(10);
AIM951_i2c_send(0x02, 0x04);
......@@ -693,7 +704,7 @@ void switch_951_Color(uint8_t in)
BSP_Delay_ms(10);
break;
case 1:
case 1://黑
AIM951_i2c_send(0xFF, 0x01);
BSP_Delay_ms(10);
AIM951_i2c_send(0x02, 0x04);
......@@ -702,7 +713,7 @@ void switch_951_Color(uint8_t in)
BSP_Delay_ms(10);
break;
case 2:
case 2://红
AIM951_i2c_send(0xFF, 0x01);
BSP_Delay_ms(10);
AIM951_i2c_send(0x02, 0x04);
......@@ -711,7 +722,7 @@ void switch_951_Color(uint8_t in)
BSP_Delay_ms(10);
break;
case 3:
case 3://绿
AIM951_i2c_send(0xFF, 0x01);
BSP_Delay_ms(10);
AIM951_i2c_send(0x02, 0x04);
......@@ -720,7 +731,7 @@ void switch_951_Color(uint8_t in)
BSP_Delay_ms(10);
break;
case 4:
case 4://蓝
AIM951_i2c_send(0xFF, 0x01);
BSP_Delay_ms(10);
AIM951_i2c_send(0x02, 0x04);
......@@ -743,5 +754,5 @@ void switch_951_Color(uint8_t in)
// }
void init_951(void)
{
switch_951_init(0);
switch_951_init(1);
}
......@@ -39,6 +39,7 @@ STimeStampInfo detection_time; // 热插拔检测时间
STimeStampInfo version_time; // 版本检测时间
uint8_t warning_light_flag = 0;
extern uint8_t color_flag;
uint8_t color_black_flag = 0;
extern uint8_t auto_color_flag;
// 接收数据全部为ASCII
void ver_Display(uint8_t u8in1, uint8_t u8in2, uint8_t u8in3, uint8_t u8in4, uint8_t u8in5, uint8_t u8in6)
......@@ -110,7 +111,251 @@ void ver_Display(uint8_t u8in1, uint8_t u8in2, uint8_t u8in3, uint8_t u8in4, uin
u8in6 = u8in6 - 48;
TFT_LCD_Draw_Bmp(u8x, 176, (uint8_t *)D[u8in6]);
}
void ver_Display_A(uint8_t u8ina1, uint8_t u8ina2, uint8_t u8ina3, uint8_t u8ina4, uint8_t u8ina5, uint8_t u8ina6,uint8_t u8ina7,uint8_t u8ina8,uint8_t u8ina9,uint8_t u8ina10,uint8_t u8ina11)
{
uint8_t u8x = 0;
if(u8ina1==45)
{
u8ina1 = 37;
}
else if(u8ina1>47&&u8ina1<58)
{
u8ina1 = u8ina1 - 48;
}
else if(u8ina1>58&&u8ina1<91)
{
u8ina1 = u8ina1 - 55;
}
else if(u8ina1>96&&u8ina1<123)
{
u8ina1 = u8ina1 - 87;
}
TFT_LCD_Draw_Bmp(u8x, 208, (uint8_t *)D[u8ina1]); // 十进制十位
u8x += 18;
if(u8ina2==45)
{
u8ina2 = 37;
}
else if(u8ina2>47&&u8ina2<58)
{
u8ina2 = u8ina2 - 48;
}
else if(u8ina2>58&&u8ina2<91)
{
u8ina2 = u8ina2 - 55;
}
else if(u8ina2>96&&u8ina2<123)
{
u8ina2 = u8ina2 - 87;
}
TFT_LCD_Draw_Bmp(u8x, 208, (uint8_t *)D[u8ina2]);
u8x += 18;
if(u8ina3==45)
{
u8ina3 = 37;
}
else if(u8ina3>47&&u8ina3<58)
{
u8ina3 = u8ina3 - 48;
}
else if(u8ina3>58&&u8ina3<91)
{
u8ina3 = u8ina3 - 55;
}
else if(u8ina1>96&&u8ina1<123)
{
u8ina3 = u8ina3 - 87;
}
TFT_LCD_Draw_Bmp(u8x, 208, (uint8_t *)D[u8ina3]);
u8x += 18;
if(u8ina4==45)
{
u8ina4 = 37;
}
else if(u8ina4>47&&u8ina4<58)
{
u8ina4 = u8ina4 - 48;
}
else if(u8ina4>58&&u8ina4<91)
{
u8ina4 = u8ina4 - 55;
}
else if(u8ina1>96&&u8ina1<123)
{
u8ina4 = u8ina4 - 87;
}
TFT_LCD_Draw_Bmp(u8x, 208, (uint8_t *)D[u8ina4]);
u8x += 18;
if(u8ina5==45)
{
u8ina5 = 37;
}
else if(u8ina5>47&&u8ina5<58)
{
u8ina5 = u8ina5 - 48;
}
else if(u8ina5>58&&u8ina5<91)
{
u8ina5 = u8ina5 - 55;
}
else if(u8ina5>96&&u8ina5<123)
{
u8ina5 = u8ina5 - 87;
}
TFT_LCD_Draw_Bmp(u8x, 208, (uint8_t *)D[u8ina5]);
u8x += 18;
if(u8ina6==45)
{
u8ina6 = 37;
}
else if(u8ina6>47&&u8ina6<58)
{
u8ina6 = u8ina6 - 48;
}
else if(u8ina6>58&&u8ina6<91)
{
u8ina6 = u8ina6 - 55;
}
else if(u8ina6>96&&u8ina6<123)
{
u8ina6 = u8ina6 - 87;
}
TFT_LCD_Draw_Bmp(u8x, 208, (uint8_t *)D[u8ina6]);
u8x += 18;
if(u8ina7==45)
{
u8ina7 = 37;
}
else if(u8ina7>47&&u8ina7<58)
{
u8ina7 = u8ina7 - 48;
}
else if(u8ina7>58&&u8ina7<91)
{
u8ina7 = u8ina7 - 55;
}
else if(u8ina7>96&&u8ina7<123)
{
u8ina7 = u8ina7 - 87;
}
TFT_LCD_Draw_Bmp(u8x, 208, (uint8_t *)D[u8ina7]);
u8x += 18;
if(u8ina8==45)
{
u8ina8 = 37;
}
else if(u8ina8>47&&u8ina8<58)
{
u8ina8 = u8ina8 - 48;
}
else if(u8ina8>58&&u8ina8<91)
{
u8ina8 = u8ina8 - 55;
}
else if(u8ina8>96&&u8ina8<123)
{
u8ina8 = u8ina8 - 87;
}
TFT_LCD_Draw_Bmp(u8x, 208, (uint8_t *)D[u8ina8]);
u8x += 18;
if(u8ina9==45)
{
u8ina9 = 37;
}
else if(u8ina9>47&&u8ina9<58)
{
u8ina9 = u8ina9 - 48;
}
else if(u8ina9>58&&u8ina9<91)
{
u8ina9 = u8ina9 - 55;
}
else if(u8ina9>96&&u8ina9<123)
{
u8ina9 = u8ina9 - 87;
}
TFT_LCD_Draw_Bmp(u8x, 208, (uint8_t *)D[u8ina9]);
u8x += 18;
if(u8ina10==45)
{
u8ina10 = 37;
}
else if(u8ina10>47&&u8ina10<58)
{
u8ina10 = u8ina10 - 48;
}
else if(u8ina10>58&&u8ina10<91)
{
u8ina10 = u8ina10 - 55;
}
else if(u8ina10>96&&u8ina10<123)
{
u8ina10 = u8ina10 - 87;
}
TFT_LCD_Draw_Bmp(u8x, 208, (uint8_t *)D[u8ina10]);
u8x += 18;
if(u8ina11==45)
{
u8ina11 = 37;
}
else if(u8ina11>47&&u8ina11<58)
{
u8ina11 = u8ina11 - 48;
}
else if(u8ina11>58&&u8ina11<91)
{
u8ina11 = u8ina11 - 55;
}
else if(u8ina11>96&&u8ina11<123)
{
u8ina11 = u8ina11 - 87;
}
TFT_LCD_Draw_Bmp(u8x, 208, (uint8_t *)D[u8ina11]);
}
void Display_Init(void)
{
TFT_LCD_Draw_Bmp(0, 0, (uint8_t *)&gImage_BG_test[0]);
......@@ -120,6 +365,7 @@ void Display_Init(void)
// TFT_LCD_Draw_Bmp( 1, 32, ( uint8_t * )gImage_point_right[tft_switch_switch]);//仪表选择显示
// TFT_LCD_Draw_Bmp( 0, 128, ( uint8_t * )gImage_point_up[display_color_switch]);//纯色界面选择
ver_Display(0x00, 0x00, 0x00, 0x00, 0x00, 0x00); // 版本号显示,前三个为
ver_Display_A(0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00);
TFT_LCD_Draw_Bmp(0, 240, (uint8_t *)gImage_lcd_error[0]);
TFT_LCD_Draw_Bmp(118, 240, (uint8_t *)gImage_touch_error[0]);
......@@ -280,42 +526,49 @@ void fx12_test_server(void)
if (lock_flag == 1)
{
ver_Display(0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
ver_Display_A(0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00);
TFT_LCD_Draw_Bmp(0, 240, (uint8_t *)gImage_lcd_error[0]);
TFT_LCD_Draw_Bmp(118, 240, (uint8_t *)gImage_touch_error[0]);
TFT_LCD_Draw_Bmp(0, 272, (uint8_t *)gImage_bl_error[0]);
TFT_LCD_Draw_Bmp(118, 272, (uint8_t *)gImage_power_error[0]);
}
lock_flag = 0;
}
// else
{
// if (lock_flag == 0)
// {
// Clear_TOUCH_IRQHandler_flag();
// TimeStamp_Update(&lock_time);
// if (TimeStamp_GetCntTime(&lock_time) >= 100)
// {
// lock_flag = 1;
// }
// }
}
// 自动切换颜色
TimeStamp_Update(&color_time);
if (TimeStamp_GetCntTime(&color_time) >= 2000)
if (TimeStamp_GetCntTime(&color_time) >= 5000)
{
TimeStamp_Reset(&color_time);
if (auto_color_flag == 1)
{
if (color_flag < 4)
if(color_flag>1)
{
color_black_flag = !color_black_flag;
}
if(color_flag == 1)
{
color_flag++;
color_black_flag = 0;
}
if(color_black_flag==1)
{
switch_951_Color(1);
}
else
{
color_flag = 0;
if (color_flag < 4)
{
color_flag++;
}
else
{
color_flag = 0;
}
switch_951_Color(color_flag);
}
switch_951_Color(color_flag);
}
}
......@@ -336,6 +589,7 @@ void fx12_test_server(void)
TFT_LCD_Draw_Bmp(80, 176, (uint8_t *)D[0]);
TFT_LCD_Draw_Bmp(116, 176, (uint8_t *)D[0]);
TFT_LCD_Draw_Bmp(152, 176, (uint8_t *)D[0]);
}
else
{
......@@ -372,6 +626,20 @@ void fx12_test_server(void)
touch_buff[14],
touch_buff[16]);
}
else if(touch_buff[0] == 0x4CU)
{
ver_Display_A(touch_buff[2],
touch_buff[3],
touch_buff[4],
touch_buff[5],
touch_buff[6],
touch_buff[7],
touch_buff[8],
touch_buff[9],
touch_buff[10],
touch_buff[11],
touch_buff[12]);
}
Clear_TOUCH_IRQHandler_flag();
}
}
......@@ -379,4 +647,4 @@ void fx12_test_server(void)
void BSP_SetBL_Brightness_PWM(uint32_t in)
{
PWM_Channel_Set_Duty(7, in); // 设置屏幕背光占空比
}
\ No newline at end of file
}
This diff is collapsed.
This diff is collapsed.
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