From 29e4ff8e32b765cc93bf28ed1490c1e0cdafe6c6 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 3 Dec 2011 00:49:33 +0100 Subject: benchmark: initialize data with deterministic pattern --- usb-benchmark-project/benchm_drv.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/usb-benchmark-project/benchm_drv.c b/usb-benchmark-project/benchm_drv.c index c6295f0..ecf2f0c 100644 --- a/usb-benchmark-project/benchm_drv.c +++ b/usb-benchmark-project/benchm_drv.c @@ -30,7 +30,7 @@ void benchmark_drv_init(void) USBD_Init(); } -const uint8_t test_data[2048]; +static uint8_t test_data[8192]; static void wr_compl_cb(void *arg, unsigned char status, unsigned int transferred, unsigned int remain) { @@ -47,5 +47,10 @@ static void wr_compl_cb(void *arg, unsigned char status, unsigned int transferre void benchmark_start(uint8_t epnr) { + int i; + + for (i = 0; i < sizeof(test_data); i++) + test_data[i] = i & 0xff; + USBD_Write(epnr, &test_data, sizeof(test_data), wr_compl_cb, epnr); } -- cgit v1.2.3