From b5f7e48ad4767f6d3b79e920c5ca8ff33b0dfca4 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 5 Apr 2013 14:52:33 +0700 Subject: [PATCH] refractor --- tests/test/host/ehci/test_ehci_init.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/tests/test/host/ehci/test_ehci_init.c b/tests/test/host/ehci/test_ehci_init.c index 4876edbdd..f68a9fe92 100644 --- a/tests/test/host/ehci/test_ehci_init.c +++ b/tests/test/host/ehci/test_ehci_init.c @@ -36,6 +36,7 @@ */ #include "unity.h" +#include "type_helper.h" #include "tusb_option.h" #include "errors.h" #include "binary.h" @@ -55,6 +56,7 @@ usbh_device_info_t usbh_devices[TUSB_CFG_HOST_DEVICE_MAX+1]; void setUp(void) { ehci_controller_init(); + hcd_init(); } void tearDown(void) @@ -66,20 +68,13 @@ void tearDown(void) //--------------------------------------------------------------------+ void test_hcd_init_data(void) { - uint32_t random_data = 0x1234; - memcpy(&ehci_data, &random_data, sizeof(random_data)); - - hcd_init(); - //------------- check memory data -------------// - for(uint32_t i=0; i