mirror of
https://github.com/marqs85/ossc
synced 2025-12-11 19:46:07 +03:00
enable latency tester on debug build
This commit is contained in:
parent
c4114c3883
commit
7d9d419a8b
@ -698,15 +698,6 @@ int init_hw()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
int latency_test()
|
|
||||||
{
|
|
||||||
sniprintf(menu_row2, LCD_ROW_LEN+1, "Unavailable");
|
|
||||||
lcd_write_menu();
|
|
||||||
usleep(1000000);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
int latency_test() {
|
int latency_test() {
|
||||||
alt_u32 lt_status, btn_vec, btn_vec_prev=1;
|
alt_u32 lt_status, btn_vec, btn_vec_prev=1;
|
||||||
alt_u16 latency_ms_x100, stb_ms_x100;
|
alt_u16 latency_ms_x100, stb_ms_x100;
|
||||||
@ -739,7 +730,9 @@ int latency_test() {
|
|||||||
SPI_Timer_Off();
|
SPI_Timer_Off();
|
||||||
latency_ms_x100 = lt_status & 0xffff;
|
latency_ms_x100 = lt_status & 0xffff;
|
||||||
stb_ms_x100 = (lt_status >> 16) & 0xfff;
|
stb_ms_x100 = (lt_status >> 16) & 0xfff;
|
||||||
if ((latency_ms_x100 == 0) || (latency_ms_x100 == 0xffff))
|
if (latency_ms_x100 == 0)
|
||||||
|
sniprintf(menu_row2, LCD_ROW_LEN+1, "False trigger");
|
||||||
|
else if (latency_ms_x100 == 0xffff)
|
||||||
sniprintf(menu_row2, LCD_ROW_LEN+1, "Timeout");
|
sniprintf(menu_row2, LCD_ROW_LEN+1, "Timeout");
|
||||||
else if (stb_ms_x100 == 0xfff)
|
else if (stb_ms_x100 == 0xfff)
|
||||||
sniprintf(menu_row2, LCD_ROW_LEN+1, "%u.%.2ums", latency_ms_x100/100, latency_ms_x100%100);
|
sniprintf(menu_row2, LCD_ROW_LEN+1, "%u.%.2ums", latency_ms_x100/100, latency_ms_x100%100);
|
||||||
@ -763,7 +756,6 @@ int latency_test() {
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// Enable chip outputs
|
// Enable chip outputs
|
||||||
void enable_outputs()
|
void enable_outputs()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user