misc update

This commit is contained in:
Gatsby Van
2024-07-05 11:26:51 +08:00
parent ad0d589141
commit 21d3baec98
4 changed files with 138 additions and 38 deletions
@@ -398,7 +398,6 @@ TEST(linklayer_reconfig)
TEST(linklayer_master_routine)
{
int32_t Status;
Linklayer_Start(linkInstPtr);
TIME_WORD timeStampA, timeStampB, timeGap;
uint32_t timeDiff;
l2Config.myType = L2_NODE_HEAD;
@@ -406,6 +405,7 @@ TEST(linklayer_master_routine)
Status = Linklayer_Reconfig(linkInstPtr, &l2Config);
ASSERT_EQUAL(SUCCESS, Status);
// 30 seconds
Linklayer_Start(linkInstPtr);
for (int i = 0; i < 30 * L2_SLOTS_PER_FRAME; i++)
{
tmcReg[TIME_INT_REG]++;
@@ -486,7 +486,6 @@ TEST(linklayer_master_routine)
TEST(linklayer_slave_netsetup)
{
int32_t Status;
Linklayer_Start(linkInstPtr);
TIME_WORD timeStampA, timeStampB, timeGap;
TIME_WORD bmTime;
uint32_t netStart, timeDiff;
@@ -502,6 +501,7 @@ TEST(linklayer_slave_netsetup)
// 74 is the index of bm frame in routine table.
netStart = bmTime.int_part % L2_SLOTS_PER_FRAME + rand_range(-12, 12);
Linklayer_Start(linkInstPtr);
for (int i = 0; i < 12 * L2_SLOTS_PER_FRAME * TIME_FRAC_MAX; i++)
{
tmcReg[TIME_FRAC_REG]++;
@@ -596,8 +596,8 @@ TEST_SUITE(linklayer_unit_test)
{
TEST_SUITE_CONFIGURE(linklayer_setup, linklayer_teardown);
RUN_TEST(linklayer_reconfig);
RUN_TEST(linklayer_slave_netsetup);
RUN_TEST(linklayer_master_routine);
RUN_TEST(linklayer_slave_netsetup);
}
int main(void)