include/ecrt.h
changeset 1913 cbef34ba142b
parent 1891 dd7879e2e72b
child 1944 73896ef6d077
child 1980 a89e2bedf004
equal deleted inserted replaced
1912:d480e0439664 1913:cbef34ba142b
    73  * - Renamed ec_sdo_request_state_t to #ec_request_state_t, because it is also
    73  * - Renamed ec_sdo_request_state_t to #ec_request_state_t, because it is also
    74  *   used by VoE handlers.
    74  *   used by VoE handlers.
    75  * - Removed 'const' from argument of ecrt_sdo_request_state(), because the
    75  * - Removed 'const' from argument of ecrt_sdo_request_state(), because the
    76  *   userspace library has to modify object internals.
    76  *   userspace library has to modify object internals.
    77  * - Added 64-bit data access macros.
    77  * - Added 64-bit data access macros.
    78  * - Added ecrt_slave_config_idn() method for storing SoE IDN configurations.
    78  * - Added ecrt_slave_config_idn() method for storing SoE IDN configurations,
       
    79  *   and ecrt_master_read_idn() and ecrt_master_write_idn() to read/write IDNs
       
    80  *   ad-hoc via the user-space library.
    79  *
    81  *
    80  * @{
    82  * @{
    81  */
    83  */
    82 
    84 
    83 /*****************************************************************************/
    85 /*****************************************************************************/
   657         uint8_t subindex, /**< Subindex of the SDO. */
   659         uint8_t subindex, /**< Subindex of the SDO. */
   658         uint8_t *target, /**< Target buffer for the upload. */
   660         uint8_t *target, /**< Target buffer for the upload. */
   659         size_t target_size, /**< Size of the target buffer. */
   661         size_t target_size, /**< Size of the target buffer. */
   660         size_t *result_size, /**< Uploaded data size. */
   662         size_t *result_size, /**< Uploaded data size. */
   661         uint32_t *abort_code /**< Abort code of the SDO upload. */
   663         uint32_t *abort_code /**< Abort code of the SDO upload. */
       
   664         );
       
   665 
       
   666 /** Executes an SoE write request.
       
   667  *
       
   668  * Starts writing an IDN and blocks until the request was processed, or an
       
   669  * error occurred.
       
   670  *
       
   671  * \retval  0 Success.
       
   672  * \retval -1 An error occured.
       
   673  */
       
   674 int ecrt_master_write_idn(
       
   675         ec_master_t *master, /**< EtherCAT master. */
       
   676         uint16_t slave_position, /**< Slave position. */
       
   677         uint16_t idn, /**< SoE IDN (see ecrt_slave_config_idn()). */
       
   678         uint8_t *data, /**< Pointer to data to write. */
       
   679         size_t data_size, /**< Size of data to write. */
       
   680         uint32_t *error_code /**< Pointer to variable, where an SoE error code
       
   681                                can be stored. */
       
   682         );
       
   683 
       
   684 /** Executes an SoE read request.
       
   685  *
       
   686  * Starts reading an IDN and blocks until the request was processed, or an
       
   687  * error occurred.
       
   688  *
       
   689  * \retval  0 Success.
       
   690  * \retval -1 An error occured.
       
   691  */
       
   692 int ecrt_master_read_idn(
       
   693         ec_master_t *master, /**< EtherCAT master. */
       
   694         uint16_t slave_position, /**< Slave position. */
       
   695         uint16_t idn, /**< SoE IDN (see ecrt_slave_config_idn()). */
       
   696         uint8_t *target, /**< Pointer to memory where the read data can be
       
   697                            stored. */
       
   698         size_t target_size, /**< Size of the memory \a target points to. */
       
   699         size_t *result_size, /**< Actual size of the received data. */
       
   700         uint32_t *error_code /**< Pointer to variable, where an SoE error code
       
   701                                can be stored. */
   662         );
   702         );
   663 
   703 
   664 #endif /* #ifndef __KERNEL__ */
   704 #endif /* #ifndef __KERNEL__ */
   665 
   705 
   666 /** Finishes the configuration phase and prepares for cyclic operation.
   706 /** Finishes the configuration phase and prepares for cyclic operation.