From e611b132f9b8abe35b362e5870b74bce94a1e58e Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 16 May 2020 20:51:50 -0700 Subject: initial commit --- private/ntos/dlc/sm2c/smlib.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 private/ntos/dlc/sm2c/smlib.c (limited to 'private/ntos/dlc/sm2c/smlib.c') diff --git a/private/ntos/dlc/sm2c/smlib.c b/private/ntos/dlc/sm2c/smlib.c new file mode 100644 index 000000000..6c4f3c9c9 --- /dev/null +++ b/private/ntos/dlc/sm2c/smlib.c @@ -0,0 +1,23 @@ + +// +// 1. Update timer T1 and Ti states +// 2. Update Va (last valid Nr received) +// 3. Call the Window algorithm +// +void UpdateVa( LINKC_TYPE linkC_Param ) +{ + // reset the reply timer, if there is no active + // command or I-frame outstanding + if (linkC.Nr > linkC.Va && linkC.Nr <= linkC.Vs) + { + if (linkC.Nr == linkC.Vsa) + { + // stop T1, restart Ti + RestartT1( ); + + } + linkC.Status.Ti_On = 1; + } + if (linkC.Status.Vp == 0 || + +} -- cgit v1.2.3