lib/sdo_request.c
branchstable-1.5
changeset 2434 fa52128477f6
parent 2433 3bdd7a747fae
child 2478 9640948881fd
equal deleted inserted replaced
2433:3bdd7a747fae 2434:fa52128477f6
    52 }
    52 }
    53 
    53 
    54 /*****************************************************************************
    54 /*****************************************************************************
    55  * Application interface.
    55  * Application interface.
    56  ****************************************************************************/
    56  ****************************************************************************/
       
    57 
       
    58 void ecrt_sdo_request_index(ec_sdo_request_t *req, uint16_t index,
       
    59         uint8_t subindex)
       
    60 {
       
    61     ec_ioctl_sdo_request_t data;
       
    62     int ret;
       
    63 
       
    64     data.config_index = req->config->index;
       
    65     data.request_index = req->index;
       
    66     data.sdo_index = index;
       
    67     data.sdo_subindex = subindex;
       
    68 
       
    69     ret = ioctl(req->config->master->fd, EC_IOCTL_SDO_REQUEST_INDEX, &data);
       
    70     if (EC_IOCTL_IS_ERROR(ret)) {
       
    71         fprintf(stderr, "Failed to set SDO request index/subindex: %s\n",
       
    72                 strerror(EC_IOCTL_ERRNO(ret)));
       
    73     }
       
    74 }
       
    75 
       
    76 /*****************************************************************************/
    57 
    77 
    58 void ecrt_sdo_request_timeout(ec_sdo_request_t *req, uint32_t timeout)
    78 void ecrt_sdo_request_timeout(ec_sdo_request_t *req, uint32_t timeout)
    59 {
    79 {
    60     ec_ioctl_sdo_request_t data;
    80     ec_ioctl_sdo_request_t data;
    61     int ret;
    81     int ret;