summaryrefslogtreecommitdiff
path: root/cesar/bsu/ntb
diff options
context:
space:
mode:
authorlaranjeiro2010-05-17 09:43:57 +0000
committerlaranjeiro2010-05-17 09:43:57 +0000
commit7e43f28ca65eac7183afb4de8e654e67ef4607c1 (patch)
tree8a27efba1d75ba6183a82f6494cf9662504a23e9 /cesar/bsu/ntb
parentced2f6e4ce42ed37eb77b576ee7b8ab42fb25bb4 (diff)
cesar/bsu: remove phy context from stubbed functions
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@7043 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/bsu/ntb')
-rw-r--r--cesar/bsu/ntb/test/utest/src/ntb.c25
-rw-r--r--cesar/bsu/ntb/test/utest/src/ntb_compute.c27
2 files changed, 25 insertions, 27 deletions
diff --git a/cesar/bsu/ntb/test/utest/src/ntb.c b/cesar/bsu/ntb/test/utest/src/ntb.c
index 8c2d2051d2..af151acc6b 100644
--- a/cesar/bsu/ntb/test/utest/src/ntb.c
+++ b/cesar/bsu/ntb/test/utest/src/ntb.c
@@ -15,8 +15,6 @@
#include "hal/phy/phy.h"
#include "bsu/ntb/test/utest/tests.h"
-#define DELAY_SYSTCK 100000
-
void
test_suite_ntb_compute (test_t test);
@@ -29,26 +27,3 @@ main (int argc, char **argv)
test_result (test);
return test_nb_failed (test) == 0 ? 0 : 1;
}
-
-/** STUBS functions. */
-u32
-phy_sysdate (phy_t *ctx) __attribute__ ((weak));
-
-u32
-phy_sysdate (phy_t *ctx)
-{
- bsu_ntb_test_phy_t *phy = (bsu_ntb_test_phy_t *) ctx;
- dbg_assert (ctx);
- return (phy->preamble_sysdate + DELAY_SYSTCK);
-}
-
-void
-phy_clock_set_numerator (phy_t *ctx, uint numerator)__attribute__((weak));
-
-void
-phy_clock_set_numerator (phy_t *ctx, uint numerator)
-{
- bsu_ntb_test_phy_t *phy = (bsu_ntb_test_phy_t *) ctx;
- dbg_assert (ctx);
- phy->numerator = numerator;
-}
diff --git a/cesar/bsu/ntb/test/utest/src/ntb_compute.c b/cesar/bsu/ntb/test/utest/src/ntb_compute.c
index 8c4a33a70a..ccad2ac07b 100644
--- a/cesar/bsu/ntb/test/utest/src/ntb_compute.c
+++ b/cesar/bsu/ntb/test/utest/src/ntb_compute.c
@@ -21,6 +21,10 @@
#include "freqerr.h"
#include "numerator.h"
+#define DELAY_SYSTCK 100000
+
+static bsu_ntb_test_t t;
+
void
test_case_ntb_ntb_sync (test_t test)
{
@@ -29,7 +33,6 @@ test_case_ntb_ntb_sync (test_t test)
{
s32 val;
uint i;
- bsu_ntb_test_t t;
bsu_ntb_sync_t sync;
bsu_ntb_test_init (&t);
bsu_ntb_init (&sync);
@@ -71,7 +74,6 @@ test_case_ntb_fail_beacons (test_t test)
uint i;
double error;
bsu_ntb_sync_t sync;
- bsu_ntb_test_t t;
bsu_ntb_test_init (&t);
bsu_ntb_init (&sync);
/* Parse beacon_bts table with a step of 5. */
@@ -100,3 +102,24 @@ test_suite_ntb_compute (test_t test)
test_case_ntb_ntb_sync (test);
test_case_ntb_fail_beacons (test);
}
+
+/** STUBS functions. */
+u32
+phy_sysdate (void) __attribute__ ((weak));
+
+u32
+phy_sysdate (void)
+{
+ return (t.phy.preamble_sysdate + DELAY_SYSTCK);
+}
+
+void
+phy_clock_set_numerator (phy_t *ctx, uint numerator)__attribute__((weak));
+
+void
+phy_clock_set_numerator (phy_t *ctx, uint numerator)
+{
+ bsu_ntb_test_phy_t *phy = (bsu_ntb_test_phy_t *) ctx;
+ dbg_assert (ctx);
+ phy->numerator = numerator;
+}