include/ecrt.h
changeset 2635 42b62867574d
parent 2630 a380cce7d6f0
equal deleted inserted replaced
2634:f859d567f94e 2635:42b62867574d
   813 int ecrt_master_sdo_download(
   813 int ecrt_master_sdo_download(
   814         ec_master_t *master, /**< EtherCAT master. */
   814         ec_master_t *master, /**< EtherCAT master. */
   815         uint16_t slave_position, /**< Slave position. */
   815         uint16_t slave_position, /**< Slave position. */
   816         uint16_t index, /**< Index of the SDO. */
   816         uint16_t index, /**< Index of the SDO. */
   817         uint8_t subindex, /**< Subindex of the SDO. */
   817         uint8_t subindex, /**< Subindex of the SDO. */
   818         uint8_t *data, /**< Data buffer to download. */
   818         const uint8_t *data, /**< Data buffer to download. */
   819         size_t data_size, /**< Size of the data buffer. */
   819         size_t data_size, /**< Size of the data buffer. */
   820         uint32_t *abort_code /**< Abort code of the SDO download. */
   820         uint32_t *abort_code /**< Abort code of the SDO download. */
   821         );
   821         );
   822 
   822 
   823 /** Executes an SDO download request to write data to a slave via complete
   823 /** Executes an SDO download request to write data to a slave via complete
   832  */
   832  */
   833 int ecrt_master_sdo_download_complete(
   833 int ecrt_master_sdo_download_complete(
   834         ec_master_t *master, /**< EtherCAT master. */
   834         ec_master_t *master, /**< EtherCAT master. */
   835         uint16_t slave_position, /**< Slave position. */
   835         uint16_t slave_position, /**< Slave position. */
   836         uint16_t index, /**< Index of the SDO. */
   836         uint16_t index, /**< Index of the SDO. */
   837         uint8_t *data, /**< Data buffer to download. */
   837         const uint8_t *data, /**< Data buffer to download. */
   838         size_t data_size, /**< Size of the data buffer. */
   838         size_t data_size, /**< Size of the data buffer. */
   839         uint32_t *abort_code /**< Abort code of the SDO download. */
   839         uint32_t *abort_code /**< Abort code of the SDO download. */
   840         );
   840         );
   841 
   841 
   842 /** Executes an SDO upload request to read data from a slave.
   842 /** Executes an SDO upload request to read data from a slave.
   954  * This method takes all datagrams, that have been queued for transmission,
   954  * This method takes all datagrams, that have been queued for transmission,
   955  * puts them into frames, and passes them to the Ethernet device for sending.
   955  * puts them into frames, and passes them to the Ethernet device for sending.
   956  *
   956  *
   957  * Has to be called cyclically by the application after ecrt_master_activate()
   957  * Has to be called cyclically by the application after ecrt_master_activate()
   958  * has returned.
   958  * has returned.
   959  */
   959  *
   960 void ecrt_master_send(
   960  * Returns the number of bytes sent.
       
   961  */
       
   962 size_t ecrt_master_send(
   961         ec_master_t *master /**< EtherCAT master. */
   963         ec_master_t *master /**< EtherCAT master. */
   962         );
   964         );
   963 
   965 
   964 /** Fetches received frames from the hardware and processes the datagrams.
   966 /** Fetches received frames from the hardware and processes the datagrams.
   965  *
   967  *
  1142         uint16_t watchdog_intervals /**< Number of base intervals for process
  1144         uint16_t watchdog_intervals /**< Number of base intervals for process
  1143                                       data watchdog. If set to zero, the value
  1145                                       data watchdog. If set to zero, the value
  1144                                       is not written, so the default is used.
  1146                                       is not written, so the default is used.
  1145                                      */
  1147                                      */
  1146         );
  1148         );
       
  1149 
       
  1150 /** Configure whether a slave allows overlapping PDOs.
       
  1151  *
       
  1152  * Overlapping PDOs allows inputs to use the same space as outputs on the frame.
       
  1153  * This reduces the frame length.
       
  1154  */
       
  1155 void ecrt_slave_config_overlapping_pdos(
       
  1156         ec_slave_config_t *sc, /**< Slave configuration. */
       
  1157         uint8_t allow_overlapping_pdos /**< Allow overlapping PDOs */
       
  1158         );
       
  1159 
  1147 
  1160 
  1148 /** Add a PDO to a sync manager's PDO assignment.
  1161 /** Add a PDO to a sync manager's PDO assignment.
  1149  *
  1162  *
  1150  * This method has to be called in non-realtime context before
  1163  * This method has to be called in non-realtime context before
  1151  * ecrt_master_activate().
  1164  * ecrt_master_activate().