diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-12-03 00:49:33 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-12-03 00:49:33 +0100 |
commit | 29e4ff8e32b765cc93bf28ed1490c1e0cdafe6c6 (patch) | |
tree | 01a625527a7d41b5587115b3249817ccd9ac7989 /usb-benchmark-project | |
parent | 2dc6ac66432eb5c865ad472e2e9817c6872465cb (diff) |
benchmark: initialize data with deterministic pattern
Diffstat (limited to 'usb-benchmark-project')
-rw-r--r-- | usb-benchmark-project/benchm_drv.c | 7 |
1 files changed, 6 insertions, 1 deletions
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); } |