lib/slave_config.c
changeset 2635 42b62867574d
parent 2634 f859d567f94e
parent 2609 777d1a8b3a27
equal deleted inserted replaced
2634:f859d567f94e 2635:42b62867574d
   113 
   113 
   114     ret = ioctl(sc->master->fd, EC_IOCTL_SC_WATCHDOG, &data);
   114     ret = ioctl(sc->master->fd, EC_IOCTL_SC_WATCHDOG, &data);
   115     if (EC_IOCTL_IS_ERROR(ret)) {
   115     if (EC_IOCTL_IS_ERROR(ret)) {
   116         fprintf(stderr, "Failed to config watchdog: %s\n",
   116         fprintf(stderr, "Failed to config watchdog: %s\n",
   117                 strerror(EC_IOCTL_ERRNO(ret)));
   117                 strerror(EC_IOCTL_ERRNO(ret)));
       
   118     }
       
   119 }
       
   120 
       
   121 /*****************************************************************************/
       
   122 
       
   123 void ecrt_slave_config_overlapping_pdos(ec_slave_config_t *sc,
       
   124         uint8_t allow_overlapping_pdos)
       
   125 {
       
   126     ec_ioctl_config_t data;
       
   127 
       
   128     memset(&data, 0, sizeof(ec_ioctl_config_t));
       
   129     data.config_index = sc->index;
       
   130     data.allow_overlapping_pdos = allow_overlapping_pdos;
       
   131 
       
   132     if (ioctl(sc->master->fd, EC_IOCTL_SC_OVERLAPPING_IO, &data) == -1) {
       
   133         fprintf(stderr, "Failed to config overlapping PDOs: %s\n",
       
   134                 strerror(errno));
   118     }
   135     }
   119 }
   136 }
   120 
   137 
   121 /*****************************************************************************/
   138 /*****************************************************************************/
   122 
   139