699 uint16_t pdo_pos, /**< Zero-based PDO position. */ |
699 uint16_t pdo_pos, /**< Zero-based PDO position. */ |
700 uint16_t entry_pos, /**< Zero-based PDO entry position. */ |
700 uint16_t entry_pos, /**< Zero-based PDO entry position. */ |
701 ec_pdo_entry_info_t *entry /**< Pointer to output structure. */ |
701 ec_pdo_entry_info_t *entry /**< Pointer to output structure. */ |
702 ); |
702 ); |
703 |
703 |
704 /** Executes an SDO write request to download data. |
704 #endif /* #ifndef __KERNEL__ */ |
705 * |
705 |
706 * This function operates aside of the normal way to request SDOs. Before the |
706 /** Executes an SDO download request to write data to a slave. |
707 * activation of the master, these requests are processed by the master state |
707 * |
708 * machine itself. After activation the user has to ensure cyclic processing. |
708 * This request is processed by the master state machine. This method blocks, |
|
709 * until the request has been processed and may not be called in realtime |
|
710 * context. |
709 * |
711 * |
710 * \retval 0 Success. |
712 * \retval 0 Success. |
711 * \retval -1 An error occured. |
713 * \retval <0 Error code. |
712 */ |
714 */ |
713 int ecrt_master_sdo_download( |
715 int ecrt_master_sdo_download( |
714 ec_master_t *master, /**< EtherCAT master. */ |
716 ec_master_t *master, /**< EtherCAT master. */ |
715 uint16_t slave_position, /**< Slave position. */ |
717 uint16_t slave_position, /**< Slave position. */ |
716 uint16_t index, /**< Index of the SDO. */ |
718 uint16_t index, /**< Index of the SDO. */ |
718 uint8_t *data, /**< Data buffer to download. */ |
720 uint8_t *data, /**< Data buffer to download. */ |
719 size_t data_size, /**< Size of the data buffer. */ |
721 size_t data_size, /**< Size of the data buffer. */ |
720 uint32_t *abort_code /**< Abort code of the SDO download. */ |
722 uint32_t *abort_code /**< Abort code of the SDO download. */ |
721 ); |
723 ); |
722 |
724 |
723 /** Executes a SDO read request to upload data. |
725 /** Executes an SDO upload request to read data from a slave. |
724 * |
726 * |
725 * This function operates aside of the normal way to request SDOs. Before the |
727 * This request is processed by the master state machine. This method blocks, |
726 * activation of the master, these requests are processed by the master state |
728 * until the request has been processed and may not be called in realtime |
727 * machine itself. After activation the user have to ensure cyclic |
729 * context. |
728 * processing. |
|
729 * |
730 * |
730 * \retval 0 Success. |
731 * \retval 0 Success. |
731 * \retval -1 Error occurred. |
732 * \retval <0 Error code. |
732 */ |
733 */ |
733 int ecrt_master_sdo_upload( |
734 int ecrt_master_sdo_upload( |
734 ec_master_t *master, /**< EtherCAT master. */ |
735 ec_master_t *master, /**< EtherCAT master. */ |
735 uint16_t slave_position, /**< Slave position. */ |
736 uint16_t slave_position, /**< Slave position. */ |
736 uint16_t index, /**< Index of the SDO. */ |
737 uint16_t index, /**< Index of the SDO. */ |
738 uint8_t *target, /**< Target buffer for the upload. */ |
739 uint8_t *target, /**< Target buffer for the upload. */ |
739 size_t target_size, /**< Size of the target buffer. */ |
740 size_t target_size, /**< Size of the target buffer. */ |
740 size_t *result_size, /**< Uploaded data size. */ |
741 size_t *result_size, /**< Uploaded data size. */ |
741 uint32_t *abort_code /**< Abort code of the SDO upload. */ |
742 uint32_t *abort_code /**< Abort code of the SDO upload. */ |
742 ); |
743 ); |
743 |
|
744 #endif /* #ifndef __KERNEL__ */ |
|
745 |
744 |
746 /** Executes an SoE write request. |
745 /** Executes an SoE write request. |
747 * |
746 * |
748 * Starts writing an IDN and blocks until the request was processed, or an |
747 * Starts writing an IDN and blocks until the request was processed, or an |
749 * error occurred. |
748 * error occurred. |