From fdee78d390d42f1b1719157d9fb5f58a2c3c1900 Mon Sep 17 00:00:00 2001 From: dzavalishin Date: Thu, 25 Jun 2015 19:26:16 +0300 Subject: [PATCH] moved request to pod_rq.h --- src/openpod/pod_device.h | 37 ++--------------------------------- src/openpod/pod_rq.h | 42 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 35 deletions(-) diff --git a/src/openpod/pod_device.h b/src/openpod/pod_device.h index ab41dcc..ed42b55 100755 --- a/src/openpod/pod_device.h +++ b/src/openpod/pod_device.h @@ -1,8 +1,10 @@ #ifndef POD_DEVICE_H #define POD_DEVICE_H +#include "pod_types.h" #include "pod_properties.h" #include "pod_kernel_api.h" +#include "pod_rq.h" struct pod_driver; struct pod_device; @@ -10,41 +12,6 @@ struct pod_q; -typedef enum pod_rq_status -{ - pod_rq_status_ok, - pod_rq_status_unprocessed, // Requset is not started in drv - pod_rq_status_dequeued, // Requset was aborted by call to ...dequeue - pod_rq_status_in_progress, // Is being served right now - pod_rq_status_inknown_err, // Error: Something we didn't think about - pod_rq_status_ioerr, // Error: IO - pod_rq_status_stopped, // Error: Driver is not active - pod_rq_status_param, // Error: Invalid request parameters - -} pod_rq_status; - -struct pod_request; - -typedef struct pod_request -{ - uint8_t request_class; // block/character/net/video io - uint8_t operation; // op id - read/write/clear screen/etc - - // request priority, more = earlier - uint32_t io_prio; - - pod_rq_status err; // результат исполнения, 0 = ок - - // Req struct part specific for request class and op id - void *op_arg; - - // Driver will call this when done - void (*done)( struct pod_request *rq ); - -} pod_request; - - - typedef struct pod_dev_f { diff --git a/src/openpod/pod_rq.h b/src/openpod/pod_rq.h index 86fb7bb..f8a4dcf 100755 --- a/src/openpod/pod_rq.h +++ b/src/openpod/pod_rq.h @@ -2,6 +2,13 @@ #define POD_RQ_H #include "pod_types.h" +#include "pod_properties.h" +#include "pod_kernel_api.h" + +struct pod_driver; +struct pod_device; +//struct pod_q; + //******************************************************************** @@ -15,5 +22,40 @@ +typedef enum pod_rq_status +{ + pod_rq_status_ok, + pod_rq_status_unprocessed, // Requset is not started in drv + pod_rq_status_dequeued, // Requset was aborted by call to ...dequeue + pod_rq_status_in_progress, // Is being served right now + pod_rq_status_inknown_err, // Error: Something we didn't think about + pod_rq_status_ioerr, // Error: IO + pod_rq_status_stopped, // Error: Driver is not active + pod_rq_status_param, // Error: Invalid request parameters + +} pod_rq_status; + +struct pod_request; + +typedef struct pod_request +{ + uint8_t request_class; // block/character/net/video io + uint8_t operation; // op id - read/write/clear screen/etc + + // request priority, more = earlier + uint32_t io_prio; + + pod_rq_status err; // результат исполнения, 0 = ок + + // Req struct part specific for request class and op id + void *op_arg; + + // Driver will call this when done + void (*done)( struct pod_request *rq ); + +} pod_request; + + + #endif // POD_RQ_H