Add Command Parser

This commit is contained in:
2026-05-28 17:46:44 +08:00
parent 67faaf25d2
commit 54777d3fd9
4 changed files with 30 additions and 5 deletions
-4
View File
@@ -1,4 +0,0 @@
timestamp=[2026-05-27 09:47:20], mode=WORKBENCH_START, duration=0:00:02.140, duration_ms=2140, data={}
timestamp=[2026-05-27 09:47:20], mode=PLATFORM_REPOSITORY_INIT, duration=0:00:00.014, duration_ms=14, data={}
timestamp=[2026-05-27 09:47:20], mode=WORKBENCH_UI_INIT, duration=0:00:00.170, duration_ms=170, data={editors_count=0, platform_editors_count=0, projects_count=0, platform_projects_count=0, active_platform_editor=false, projects=}
timestamp=[2026-05-27 09:48:49], mode=PLATFORM_GENERATION, duration=0:00:10.747, duration_ms=10747, data={name=NewInstCal_bsp}
@@ -29,3 +29,5 @@ platform config -updatehw {/home/ly0kos/work/prj/New_CalBoard/2.FW/Zynq/Debug_FW
platform generate platform generate
platform active {NewInstCal_bsp} platform active {NewInstCal_bsp}
platform generate platform generate
platform active {NewInstCal_bsp}
platform generate
+28 -1
View File
@@ -77,7 +77,34 @@ int main()
{ {
xil_printf("[E] UART Receive ERROR!!! Check PrintOut Ahead\r\n"); xil_printf("[E] UART Receive ERROR!!! Check PrintOut Ahead\r\n");
} }
switch (recvbuffer[0])
{
case 0xA0:
{
xil_printf("[D] Matched Command Reset\r\n");
rst_CPLD(CPLD_U1,4);
rst_CPLD(CPLD_U2,4);
rst_CPLD(CPLD_U3,4);
xil_printf("[I] CPLD RST Done\r\n");
break;
}
case 0xA1: //PMU Cal
{
break;
}
case 0xA2: //Freq Cal
{
break;
}
default:
{
xil_printf("[E] Command Header No Match! \r\n[D] Received Command Header:0x%02X Check Command!\r\n",recvbuffer[0]);
break;
}
}
} }
/* never reached */ /* never reached */