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/req_ctx.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'firmware/src/os/req_ctx.h') diff --git a/firmware/src/os/req_ctx.h b/firmware/src/os/req_ctx.h index 82a133f..b68fb66 100644 --- a/firmware/src/os/req_ctx.h +++ b/firmware/src/os/req_ctx.h @@ -9,18 +9,11 @@ #include -struct req_buf { - u_int16_t hdr_len; - u_int16_t tot_len; - u_int8_t data[64]; -}; - struct req_ctx { - u_int16_t seq; /* request sequence number */ - u_int16_t flags; volatile u_int32_t state; - struct req_buf rx; - struct req_buf tx; + u_int16_t size; + u_int16_t tot_len; + u_int8_t *data; }; #define RCTX_STATE_FREE 0x00 @@ -39,8 +32,7 @@ struct req_ctx { #define RCTX_STATE_PIOIRQ_BUSY 0x80 -#define NUM_REQ_CTX 8 -extern struct req_ctx *req_ctx_find_get(unsigned long old_state, unsigned long new_state); +extern struct req_ctx *req_ctx_find_get(int large, unsigned long old_state, unsigned long new_state); extern struct req_ctx *req_ctx_find_busy(void); extern void req_ctx_set_state(struct req_ctx *ctx, unsigned long new_state); extern void req_ctx_put(struct req_ctx *ctx); -- cgit v1.2.3