include/ecrt.h
changeset 2150 5144a4bc6184
parent 2107 ebda087981e1
child 2245 13ef066f37d3
equal deleted inserted replaced
2149:98e1e773bed0 2150:5144a4bc6184
     1 /******************************************************************************
     1 /******************************************************************************
     2  *
     2  *
     3  *  $Id$
     3  *  $Id: ecrt.h,v ebda087981e1 2011/09/15 13:58:58 fp $
     4  *
     4  *
     5  *  Copyright (C) 2006-2008  Florian Pose, Ingenieurgemeinschaft IgH
     5  *  Copyright (C) 2006-2008  Florian Pose, Ingenieurgemeinschaft IgH
     6  *
     6  *
     7  *  This file is part of the IgH EtherCAT master userspace library.
     7  *  This file is part of the IgH EtherCAT master userspace library.
     8  *
     8  *
    60  *   userspace.
    60  *   userspace.
    61  * - Added bus information interface (methods ecrt_master(),
    61  * - Added bus information interface (methods ecrt_master(),
    62  *   ecrt_master_get_slave(), ecrt_master_get_sync_manager(),
    62  *   ecrt_master_get_slave(), ecrt_master_get_sync_manager(),
    63  *   ecrt_master_get_pdo() and ecrt_master_get_pdo_entry()) to get information
    63  *   ecrt_master_get_pdo() and ecrt_master_get_pdo_entry()) to get information
    64  *   about the currently connected slaves and the PDO entries provided.
    64  *   about the currently connected slaves and the PDO entries provided.
    65  * - Added ecrt_master_sdo_download() and ecrt_master_sdo_upload()
    65  * - Added ecrt_master_sdo_download(), ecrt_master_sdo_download_complete() and
    66  *   methods to let an application transfer SDOs before activating the master.
    66  *   ecrt_master_sdo_upload() methods to let an application transfer SDOs
       
    67  *   before activating the master.
    67  * - Changed the meaning of the negative return values of
    68  * - Changed the meaning of the negative return values of
    68  *   ecrt_slave_config_reg_pdo_entry() and ecrt_slave_config_sdo*().
    69  *   ecrt_slave_config_reg_pdo_entry() and ecrt_slave_config_sdo*().
    69  * - Implemented the Vendor-specific over EtherCAT mailbox protocol. See
    70  * - Implemented the Vendor-specific over EtherCAT mailbox protocol. See
    70  *   ecrt_slave_config_create_voe_handler().
    71  *   ecrt_slave_config_create_voe_handler().
    71  * - Renamed ec_sdo_request_state_t to #ec_request_state_t, because it is also
    72  * - Renamed ec_sdo_request_state_t to #ec_request_state_t, because it is also
   720         uint8_t *data, /**< Data buffer to download. */
   721         uint8_t *data, /**< Data buffer to download. */
   721         size_t data_size, /**< Size of the data buffer. */
   722         size_t data_size, /**< Size of the data buffer. */
   722         uint32_t *abort_code /**< Abort code of the SDO download. */
   723         uint32_t *abort_code /**< Abort code of the SDO download. */
   723         );
   724         );
   724 
   725 
       
   726 /** Executes an SDO download request to write data to a slave via complete
       
   727  * access.
       
   728  *
       
   729  * This request is processed by the master state machine. This method blocks,
       
   730  * until the request has been processed and may not be called in realtime
       
   731  * context.
       
   732  *
       
   733  * \retval  0 Success.
       
   734  * \retval <0 Error code.
       
   735  */
       
   736 int ecrt_master_sdo_download_complete(
       
   737         ec_master_t *master, /**< EtherCAT master. */
       
   738         uint16_t slave_position, /**< Slave position. */
       
   739         uint16_t index, /**< Index of the SDO. */
       
   740         uint8_t *data, /**< Data buffer to download. */
       
   741         size_t data_size, /**< Size of the data buffer. */
       
   742         uint32_t *abort_code /**< Abort code of the SDO download. */
       
   743         );
       
   744 
   725 /** Executes an SDO upload request to read data from a slave.
   745 /** Executes an SDO upload request to read data from a slave.
   726  *
   746  *
   727  * This request is processed by the master state machine. This method blocks,
   747  * This request is processed by the master state machine. This method blocks,
   728  * until the request has been processed and may not be called in realtime
   748  * until the request has been processed and may not be called in realtime
   729  * context.
   749  * context.