From 514b0f72f50b50b75ef855f008c888f29989d68e Mon Sep 17 00:00:00 2001 From: laforge Date: Wed, 20 Sep 2006 11:44:10 +0000 Subject: - Add OpenPICC register definition (and USB command handling) - Add automatic generation of include/compile.h with svn revision and compiletime - Add openpcd_compile_version structure to obtain version via USB - Move LED commands into new CMD_CLS_GENERIC family - Update TODO - Add support for large (2048 byte) request contexts in addition to 64byte - Shrink req_ctx size by collapsing rx and tx buffer into one - move definition of DFU_API_LOCATION to header file - Implement large req_ctx aware USB transmit / refill routines - Implement TX refilling for IRQ Endpoint - Print version information at startup time - move some generic req_ctx processing into usb_handler.c - Some further work on DFU (still not finished) - Only use '-Os' for DFU, use '-O2' for application code git-svn-id: https://svn.openpcd.org:2342/trunk@208 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- firmware/src/os/usb_benchmark.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'firmware/src/os/usb_benchmark.c') diff --git a/firmware/src/os/usb_benchmark.c b/firmware/src/os/usb_benchmark.c index 1f890bf..bfc6b37 100644 --- a/firmware/src/os/usb_benchmark.c +++ b/firmware/src/os/usb_benchmark.c @@ -33,6 +33,8 @@ static void usbtest_tx_transfer(unsigned int num_pkts) { unsigned int i; +#if 0 +#warning please reimplement refill userspecified rctx for (i = 0; i < num_pkts; i++) { /* send 16 packets of 64byte */ while (udp_refill_ep(2, &dummy_rctx) < 0) @@ -41,11 +43,12 @@ static void usbtest_tx_transfer(unsigned int num_pkts) /* send one packet of 0 byte */ while (udp_refill_ep(2, &empty_rctx) < 0) ; +#endif } static int usbtest_rx(struct req_ctx *rctx) { - struct openpcd_hdr *poh = (struct openpcd_hdr *) &rctx->rx.data[0]; + struct openpcd_hdr *poh = (struct openpcd_hdr *) rctx->data; int i; switch (poh->cmd) { @@ -67,10 +70,10 @@ static int usbtest_rx(struct req_ctx *rctx) void usbtest_init(void) { - dummy_rctx.tx.tot_len = 64; - memset(dummy_rctx.tx.data, 0x23, 64); + dummy_rctx.tot_len = 64; + memset(dummy_rctx.data, 0x23, 64); - empty_rctx.tx.tot_len = 0; + empty_rctx.tot_len = 0; usb_hdlr_register(&usbtest_rx, OPENPCD_CMD_CLS_USBTEST); } -- cgit v1.2.3