tired of refractoring tests (wanting to do some production code)

This commit is contained in:
hathach
2013-05-12 20:06:55 +07:00
parent cc49607434
commit 6354f4bb4d
5 changed files with 28 additions and 22 deletions
+5 -7
View File
@@ -36,6 +36,7 @@
*/
/**************************************************************************/
#include <stdlib.h>
#include "unity.h"
#include "tusb_option.h"
#include "errors.h"
@@ -69,13 +70,10 @@ void setUp(void)
dev_addr = 1;
hostid = RANDOM(CONTROLLER_HOST_NUMBER) + TEST_CONTROLLER_HOST_START_INDEX;
for (uint8_t i=0; i<TUSB_CFG_HOST_DEVICE_MAX+1; i++)
{
usbh_devices[i].core_id = hostid;
usbh_devices[i].hub_addr = hub_addr;
usbh_devices[i].hub_port = hub_port;
usbh_devices[i].speed = TUSB_SPEED_HIGH;
}
usbh_devices[dev_addr].core_id = hostid;
usbh_devices[dev_addr].hub_addr = hub_addr;
usbh_devices[dev_addr].hub_port = hub_port;
usbh_devices[dev_addr].speed = TUSB_SPEED_HIGH;
async_head = get_async_head( hostid );
}