equal
deleted
inserted
replaced
292 data.config_index = sc->index; |
292 data.config_index = sc->index; |
293 data.index = index; |
293 data.index = index; |
294 data.subindex = subindex; |
294 data.subindex = subindex; |
295 data.data = sdo_data; |
295 data.data = sdo_data; |
296 data.size = size; |
296 data.size = size; |
|
297 data.complete_access = 0; |
|
298 |
|
299 if (ioctl(sc->master->fd, EC_IOCTL_SC_SDO, &data) == -1) { |
|
300 fprintf(stderr, "Failed to configure SDO.\n"); |
|
301 return -1; // FIXME |
|
302 } |
|
303 |
|
304 return 0; |
|
305 } |
|
306 |
|
307 /*****************************************************************************/ |
|
308 |
|
309 int ecrt_slave_config_complete_sdo(ec_slave_config_t *sc, uint16_t index, |
|
310 const uint8_t *sdo_data, size_t size) |
|
311 { |
|
312 ec_ioctl_sc_sdo_t data; |
|
313 |
|
314 data.config_index = sc->index; |
|
315 data.index = index; |
|
316 data.subindex = 0; |
|
317 data.data = sdo_data; |
|
318 data.size = size; |
|
319 data.complete_access = 1; |
297 |
320 |
298 if (ioctl(sc->master->fd, EC_IOCTL_SC_SDO, &data) == -1) { |
321 if (ioctl(sc->master->fd, EC_IOCTL_SC_SDO, &data) == -1) { |
299 fprintf(stderr, "Failed to configure SDO.\n"); |
322 fprintf(stderr, "Failed to configure SDO.\n"); |
300 return -1; // FIXME |
323 return -1; // FIXME |
301 } |
324 } |