master/soe_request.c
changeset 1843 4d44d8bee580
parent 1831 1875b9fea0ba
child 1864 0a6b3aacc847
equal deleted inserted replaced
1842:6d3190b9d464 1843:4d44d8bee580
    59     req->data = NULL;
    59     req->data = NULL;
    60     req->mem_size = 0;
    60     req->mem_size = 0;
    61     req->data_size = 0;
    61     req->data_size = 0;
    62     req->dir = EC_DIR_INVALID;
    62     req->dir = EC_DIR_INVALID;
    63     req->state = EC_INT_REQUEST_INIT;
    63     req->state = EC_INT_REQUEST_INIT;
    64     //req->jiffies_start = 0U;
       
    65     req->jiffies_sent = 0U;
    64     req->jiffies_sent = 0U;
    66     req->error_code = 0x0000;
    65     req->error_code = 0x0000;
    67 }
    66 }
    68 
    67 
    69 /*****************************************************************************/
    68 /*****************************************************************************/
    77     ec_soe_request_clear_data(req);
    76     ec_soe_request_clear_data(req);
    78 }
    77 }
    79 
    78 
    80 /*****************************************************************************/
    79 /*****************************************************************************/
    81 
    80 
       
    81 /** Copy another SoE request.
       
    82  */
       
    83 int ec_soe_request_copy(
       
    84         ec_soe_request_t *req, /**< SoE request. */
       
    85         const ec_soe_request_t *other /**< Other SoE request to copy from. */
       
    86         )
       
    87 {
       
    88     req->idn = other->idn;
       
    89     return ec_soe_request_copy_data(req, other->data, other->data_size);
       
    90 }
       
    91 
       
    92 /*****************************************************************************/
       
    93 
    82 /** Set IDN.
    94 /** Set IDN.
    83  */
    95  */
    84 void ec_soe_request_set_idn(
    96 void ec_soe_request_set_idn(
    85         ec_soe_request_t *req, /**< SoE request. */
    97         ec_soe_request_t *req, /**< SoE request. */
    86         uint16_t idn /** IDN. */
    98         uint16_t idn /** IDN. */
    87         )
    99         )
    88 {
   100 {
    89     req->idn = idn;
   101     req->idn = idn;
    90 }
   102 }
    91 
       
    92 #if 0
       
    93 /*****************************************************************************/
       
    94 
       
    95 /** Copy another SoE request.
       
    96  *
       
    97  * \attention Only the index subindex and data are copied.
       
    98  */
       
    99 int ec_soe_request_copy(
       
   100         ec_soe_request_t *req, /**< SoE request. */
       
   101         const ec_soe_request_t *other /**< Other SoE request to copy from. */
       
   102         )
       
   103 {
       
   104     req->complete_access = other->complete_access;
       
   105     req->index = other->index;
       
   106     req->subindex = other->subindex;
       
   107     return ec_soe_request_copy_data(req, other->data, other->data_size);
       
   108 }
       
   109 #endif
       
   110 
   103 
   111 /*****************************************************************************/
   104 /*****************************************************************************/
   112 
   105 
   113 /** Free allocated memory.
   106 /** Free allocated memory.
   114  */
   107  */