/** Write data to EtherCAT datagram.
*
- * @param[out] datagramdata = data part of datagram
- * @param[in] com = command
- * @param[in] length = length of databuffer
- * @param[in] data = databuffer to be copied into datagram
+ * @param[out] datagramdata data part of datagram
+ * @param[in] com command
+ * @param[in] length length of databuffer
+ * @param[in] data databuffer to be copied into datagram
*/
static void ecx_writedatagramdata(void *datagramdata, ec_cmdtype com, uint16 length, const void *data)
{
/** Generate and set EtherCAT datagram in a standard ethernet frame.
*
- * @param[in] port = port context struct
- * @param[out] frame = framebuffer
- * @param[in] com = command
- * @param[in] idx = index used for TX and RX buffers
- * @param[in] ADP = Address Position
- * @param[in] ADO = Address Offset
- * @param[in] length = length of datagram excluding EtherCAT header
- * @param[in] data = databuffer to be copied in datagram
+ * @param[in] port port context struct
+ * @param[out] frame framebuffer
+ * @param[in] com command
+ * @param[in] idx index used for TX and RX buffers
+ * @param[in] ADP Address Position
+ * @param[in] ADO Address Offset
+ * @param[in] length length of datagram excluding EtherCAT header
+ * @param[in] data databuffer to be copied in datagram
* @return always 0
*/
int ecx_setupdatagram(ecx_portt *port, void *frame, uint8 com, uint8 idx, uint16 ADP, uint16 ADO, uint16 length, void *data)
/** Add EtherCAT datagram to a standard ethernet frame with existing datagram(s).
*
- * @param[in] port = port context struct
- * @param[out] frame = framebuffer
- * @param[in] com = command
- * @param[in] idx = index used for TX and RX buffers
- * @param[in] more = TRUE if still more datagrams to follow
- * @param[in] ADP = Address Position
- * @param[in] ADO = Address Offset
- * @param[in] length = length of datagram excluding EtherCAT header
- * @param[in] data = databuffer to be copied in datagram
+ * @param[in] port port context struct
+ * @param[out] frame framebuffer
+ * @param[in] com command
+ * @param[in] idx index used for TX and RX buffers
+ * @param[in] more TRUE if still more datagrams to follow
+ * @param[in] ADP Address Position
+ * @param[in] ADO Address Offset
+ * @param[in] length length of datagram excluding EtherCAT header
+ * @param[in] data databuffer to be copied in datagram
* @return Offset to data in rx frame, useful to retrieve data after RX.
*/
uint16 ecx_adddatagram(ecx_portt *port, void *frame, uint8 com, uint8 idx, boolean more, uint16 ADP, uint16 ADO, uint16 length, void *data)
/** BRW "broadcast write" primitive. Blocking.
*
- * @param[in] port = port context struct
- * @param[in] ADP = Address Position, normally 0
- * @param[in] ADO = Address Offset, slave memory address
- * @param[in] length = length of databuffer
- * @param[in] data = databuffer to be written to slaves
- * @param[in] timeout = timeout in us, standard is EC_TIMEOUTRET
+ * @param[in] port port context struct
+ * @param[in] ADP Address Position, normally 0
+ * @param[in] ADO Address Offset, slave memory address
+ * @param[in] length length of databuffer
+ * @param[in] data databuffer to be written to slaves
+ * @param[in] timeout timeout in us, standard is EC_TIMEOUTRET
* @return Workcounter or EC_NOFRAME
*/
int ecx_BWR(ecx_portt *port, uint16 ADP, uint16 ADO, uint16 length, void *data, int timeout)
/** BRD "broadcast read" primitive. Blocking.
*
- * @param[in] port = port context struct
- * @param[in] ADP = Address Position, normally 0
- * @param[in] ADO = Address Offset, slave memory address
- * @param[in] length = length of databuffer
- * @param[out] data = databuffer to put slave data in
- * @param[in] timeout = timeout in us, standard is EC_TIMEOUTRET
+ * @param[in] port port context struct
+ * @param[in] ADP Address Position, normally 0
+ * @param[in] ADO Address Offset, slave memory address
+ * @param[in] length length of databuffer
+ * @param[out] data databuffer to put slave data in
+ * @param[in] timeout timeout in us, standard is EC_TIMEOUTRET
* @return Workcounter or EC_NOFRAME
*/
int ecx_BRD(ecx_portt *port, uint16 ADP, uint16 ADO, uint16 length, void *data, int timeout)
/** APRD "auto increment address read" primitive. Blocking.
*
- * @param[in] port = port context struct
- * @param[in] ADP = Address Position, each slave ++, slave that has 0 executes
- * @param[in] ADO = Address Offset, slave memory address
- * @param[in] length = length of databuffer
- * @param[out] data = databuffer to put slave data in
- * @param[in] timeout = timeout in us, standard is EC_TIMEOUTRET
+ * @param[in] port port context struct
+ * @param[in] ADP Address Position, each slave ++, slave that has 0 executes
+ * @param[in] ADO Address Offset, slave memory address
+ * @param[in] length length of databuffer
+ * @param[out] data databuffer to put slave data in
+ * @param[in] timeout timeout in us, standard is EC_TIMEOUTRET
* @return Workcounter or EC_NOFRAME
*/
int ecx_APRD(ecx_portt *port, uint16 ADP, uint16 ADO, uint16 length, void *data, int timeout)
/** APRMW "auto increment address read, multiple write" primitive. Blocking.
*
- * @param[in] port = port context struct
- * @param[in] ADP = Address Position, each slave ++, slave that has 0 reads,
+ * @param[in] port port context struct
+ * @param[in] ADP Address Position, each slave ++, slave that has 0 reads,
* following slaves write.
- * @param[in] ADO = Address Offset, slave memory address
- * @param[in] length = length of databuffer
- * @param[out] data = databuffer to put slave data in
- * @param[in] timeout = timeout in us, standard is EC_TIMEOUTRET
+ * @param[in] ADO Address Offset, slave memory address
+ * @param[in] length length of databuffer
+ * @param[out] data databuffer to put slave data in
+ * @param[in] timeout timeout in us, standard is EC_TIMEOUTRET
* @return Workcounter or EC_NOFRAME
*/
int ecx_ARMW(ecx_portt *port, uint16 ADP, uint16 ADO, uint16 length, void *data, int timeout)
/** FPRMW "configured address read, multiple write" primitive. Blocking.
*
- * @param[in] port = port context struct
- * @param[in] ADP = Address Position, slave that has address reads,
+ * @param[in] port port context struct
+ * @param[in] ADP Address Position, slave that has address reads,
* following slaves write.
- * @param[in] ADO = Address Offset, slave memory address
- * @param[in] length = length of databuffer
- * @param[out] data = databuffer to put slave data in
- * @param[in] timeout = timeout in us, standard is EC_TIMEOUTRET
+ * @param[in] ADO Address Offset, slave memory address
+ * @param[in] length length of databuffer
+ * @param[out] data databuffer to put slave data in
+ * @param[in] timeout timeout in us, standard is EC_TIMEOUTRET
* @return Workcounter or EC_NOFRAME
*/
int ecx_FRMW(ecx_portt *port, uint16 ADP, uint16 ADO, uint16 length, void *data, int timeout)
/** APRDw "auto increment address read" word return primitive. Blocking.
*
- * @param[in] port = port context struct
- * @param[in] ADP = Address Position, each slave ++, slave that has 0 reads.
- * @param[in] ADO = Address Offset, slave memory address
- * @param[in] timeout = timeout in us, standard is EC_TIMEOUTRET
+ * @param[in] port port context struct
+ * @param[in] ADP Address Position, each slave ++, slave that has 0 reads.
+ * @param[in] ADO Address Offset, slave memory address
+ * @param[in] timeout timeout in us, standard is EC_TIMEOUTRET
* @return word data from slave
*/
uint16 ecx_APRDw(ecx_portt *port, uint16 ADP, uint16 ADO, int timeout)
/** FPRD "configured address read" primitive. Blocking.
*
- * @param[in] port = port context struct
- * @param[in] ADP = Address Position, slave that has address reads.
- * @param[in] ADO = Address Offset, slave memory address
- * @param[in] length = length of databuffer
- * @param[out] data = databuffer to put slave data in
- * @param[in] timeout = timeout in us, standard is EC_TIMEOUTRET
+ * @param[in] port port context struct
+ * @param[in] ADP Address Position, slave that has address reads.
+ * @param[in] ADO Address Offset, slave memory address
+ * @param[in] length length of databuffer
+ * @param[out] data databuffer to put slave data in
+ * @param[in] timeout timeout in us, standard is EC_TIMEOUTRET
* @return Workcounter or EC_NOFRAME
*/
int ecx_FPRD(ecx_portt *port, uint16 ADP, uint16 ADO, uint16 length, void *data, int timeout)
/** FPRDw "configured address read" word return primitive. Blocking.
*
- * @param[in] port = port context struct
- * @param[in] ADP = Address Position, slave that has address reads.
- * @param[in] ADO = Address Offset, slave memory address
- * @param[in] timeout = timeout in us, standard is EC_TIMEOUTRET
+ * @param[in] port port context struct
+ * @param[in] ADP Address Position, slave that has address reads.
+ * @param[in] ADO Address Offset, slave memory address
+ * @param[in] timeout timeout in us, standard is EC_TIMEOUTRET
* @return word data from slave
*/
uint16 ecx_FPRDw(ecx_portt *port, uint16 ADP, uint16 ADO, int timeout)
/** APWR "auto increment address write" primitive. Blocking.
*
- * @param[in] port = port context struct
- * @param[in] ADP = Address Position, each slave ++, slave that has 0 writes.
- * @param[in] ADO = Address Offset, slave memory address
- * @param[in] length = length of databuffer
- * @param[in] data = databuffer to write to slave.
- * @param[in] timeout = timeout in us, standard is EC_TIMEOUTRET
+ * @param[in] port port context struct
+ * @param[in] ADP Address Position, each slave ++, slave that has 0 writes.
+ * @param[in] ADO Address Offset, slave memory address
+ * @param[in] length length of databuffer
+ * @param[in] data databuffer to write to slave.
+ * @param[in] timeout timeout in us, standard is EC_TIMEOUTRET
* @return Workcounter or EC_NOFRAME
*/
int ecx_APWR(ecx_portt *port, uint16 ADP, uint16 ADO, uint16 length, void *data, int timeout)
/** APWRw "auto increment address write" word primitive. Blocking.
*
- * @param[in] port = port context struct
- * @param[in] ADP = Address Position, each slave ++, slave that has 0 writes.
- * @param[in] ADO = Address Offset, slave memory address
- * @param[in] data = word data to write to slave.
- * @param[in] timeout = timeout in us, standard is EC_TIMEOUTRET
+ * @param[in] port port context struct
+ * @param[in] ADP Address Position, each slave ++, slave that has 0 writes.
+ * @param[in] ADO Address Offset, slave memory address
+ * @param[in] data word data to write to slave.
+ * @param[in] timeout timeout in us, standard is EC_TIMEOUTRET
* @return Workcounter or EC_NOFRAME
*/
int ecx_APWRw(ecx_portt *port, uint16 ADP, uint16 ADO, uint16 data, int timeout)
/** FPWR "configured address write" primitive. Blocking.
*
- * @param[in] port = port context struct
- * @param[in] ADP = Address Position, slave that has address writes.
- * @param[in] ADO = Address Offset, slave memory address
- * @param[in] length = length of databuffer
- * @param[in] data = databuffer to write to slave.
- * @param[in] timeout = timeout in us, standard is EC_TIMEOUTRET
+ * @param[in] port port context struct
+ * @param[in] ADP Address Position, slave that has address writes.
+ * @param[in] ADO Address Offset, slave memory address
+ * @param[in] length length of databuffer
+ * @param[in] data databuffer to write to slave.
+ * @param[in] timeout timeout in us, standard is EC_TIMEOUTRET
* @return Workcounter or EC_NOFRAME
*/
int ecx_FPWR(ecx_portt *port, uint16 ADP, uint16 ADO, uint16 length, void *data, int timeout)
/** FPWR "configured address write" primitive. Blocking.
*
- * @param[in] port = port context struct
- * @param[in] ADP = Address Position, slave that has address writes.
- * @param[in] ADO = Address Offset, slave memory address
- * @param[in] data = word to write to slave.
- * @param[in] timeout = timeout in us, standard is EC_TIMEOUTRET
+ * @param[in] port port context struct
+ * @param[in] ADP Address Position, slave that has address writes.
+ * @param[in] ADO Address Offset, slave memory address
+ * @param[in] data word to write to slave.
+ * @param[in] timeout timeout in us, standard is EC_TIMEOUTRET
* @return Workcounter or EC_NOFRAME
*/
int ecx_FPWRw(ecx_portt *port, uint16 ADP, uint16 ADO, uint16 data, int timeout)
/** LRW "logical memory read / write" primitive. Blocking.
*
- * @param[in] port = port context struct
- * @param[in] LogAdr = Logical memory address
- * @param[in] length = length of databuffer
- * @param[in,out] data = databuffer to write to and read from slave.
- * @param[in] timeout = timeout in us, standard is EC_TIMEOUTRET
+ * @param[in] port port context struct
+ * @param[in] LogAdr Logical memory address
+ * @param[in] length length of databuffer
+ * @param[in,out] data databuffer to write to and read from slave.
+ * @param[in] timeout timeout in us, standard is EC_TIMEOUTRET
* @return Workcounter or EC_NOFRAME
*/
int ecx_LRW(ecx_portt *port, uint32 LogAdr, uint16 length, void *data, int timeout)
/** LRD "logical memory read" primitive. Blocking.
*
- * @param[in] port = port context struct
- * @param[in] LogAdr = Logical memory address
- * @param[in] length = length of bytes to read from slave.
- * @param[out] data = databuffer to read from slave.
- * @param[in] timeout = timeout in us, standard is EC_TIMEOUTRET
+ * @param[in] port port context struct
+ * @param[in] LogAdr Logical memory address
+ * @param[in] length length of bytes to read from slave.
+ * @param[out] data databuffer to read from slave.
+ * @param[in] timeout timeout in us, standard is EC_TIMEOUTRET
* @return Workcounter or EC_NOFRAME
*/
int ecx_LRD(ecx_portt *port, uint32 LogAdr, uint16 length, void *data, int timeout)
/** LWR "logical memory write" primitive. Blocking.
*
- * @param[in] port = port context struct
- * @param[in] LogAdr = Logical memory address
- * @param[in] length = length of databuffer
- * @param[in] data = databuffer to write to slave.
- * @param[in] timeout = timeout in us, standard is EC_TIMEOUTRET
+ * @param[in] port port context struct
+ * @param[in] LogAdr Logical memory address
+ * @param[in] length length of databuffer
+ * @param[in] data databuffer to write to slave.
+ * @param[in] timeout timeout in us, standard is EC_TIMEOUTRET
* @return Workcounter or EC_NOFRAME
*/
int ecx_LWR(ecx_portt *port, uint32 LogAdr, uint16 length, void *data, int timeout)
/** LRW "logical memory read / write" primitive plus Clock Distribution. Blocking.
* Frame consists of two datagrams, one LRW and one FPRMW.
*
- * @param[in] port = port context struct
- * @param[in] LogAdr = Logical memory address
- * @param[in] length = length of databuffer
- * @param[in,out] data = databuffer to write to and read from slave.
- * @param[in] DCrs = Distributed Clock reference slave address.
- * @param[out] DCtime = DC time read from reference slave.
- * @param[in] timeout = timeout in us, standard is EC_TIMEOUTRET
+ * @param[in] port port context struct
+ * @param[in] LogAdr Logical memory address
+ * @param[in] length length of databuffer
+ * @param[in,out] data databuffer to write to and read from slave.
+ * @param[in] DCrs Distributed Clock reference slave address.
+ * @param[out] DCtime DC time read from reference slave.
+ * @param[in] timeout timeout in us, standard is EC_TIMEOUTRET
* @return Workcounter or EC_NOFRAME
*/
int ecx_LRWDC(ecx_portt *port, uint32 LogAdr, uint16 length, void *data, uint16 DCrs, int64 *DCtime, int timeout)
/** Report SDO error.
*
- * @param[in] context = context struct
- * @param[in] Slave = Slave number
- * @param[in] Index = Index that generated error
- * @param[in] SubIdx = Subindex that generated error
- * @param[in] AbortCode = Abortcode, see EtherCAT documentation for list
+ * @param[in] context context struct
+ * @param[in] Slave Slave number
+ * @param[in] Index Index that generated error
+ * @param[in] SubIdx Subindex that generated error
+ * @param[in] AbortCode Abortcode, see EtherCAT documentation for list
*/
void ecx_SDOerror(ecx_contextt *context, uint16 Slave, uint16 Index, uint8 SubIdx, int32 AbortCode)
{
/** Report SDO info error
*
- * @param[in] context = context struct
- * @param[in] Slave = Slave number
- * @param[in] Index = Index that generated error
- * @param[in] SubIdx = Subindex that generated error
- * @param[in] AbortCode = Abortcode, see EtherCAT documentation for list
+ * @param[in] context context struct
+ * @param[in] Slave Slave number
+ * @param[in] Index Index that generated error
+ * @param[in] SubIdx Subindex that generated error
+ * @param[in] AbortCode Abortcode, see EtherCAT documentation for list
*/
static void ecx_SDOinfoerror(ecx_contextt *context, uint16 Slave, uint16 Index, uint8 SubIdx, int32 AbortCode)
{
* response is larger than the mailbox size then the response is segmented. The function
* will combine all segments and copy them to the parameter buffer.
*
- * @param[in] context = context struct
- * @param[in] slave = Slave number
- * @param[in] index = Index to read
- * @param[in] subindex = Subindex to read, must be 0 or 1 if CA is used.
- * @param[in] CA = FALSE = single subindex. TRUE = Complete Access, all subindexes read.
- * @param[in,out] psize = Size in bytes of parameter buffer, returns bytes read from SDO.
- * @param[out] p = Pointer to parameter buffer
- * @param[in] timeout = Timeout in us, standard is EC_TIMEOUTRXM
+ * @param[in] context context struct
+ * @param[in] slave Slave number
+ * @param[in] index Index to read
+ * @param[in] subindex Subindex to read, must be 0 or 1 if CA is used.
+ * @param[in] CA FALSE = single subindex. TRUE = Complete Access, all subindexes read.
+ * @param[in,out] psize Size in bytes of parameter buffer, returns bytes read from SDO.
+ * @param[out] p Pointer to parameter buffer
+ * @param[in] timeout Timeout in us, standard is EC_TIMEOUTRXM
* @return Workcounter from last slave response
*/
int ecx_SDOread(ecx_contextt *context, uint16 slave, uint16 index, uint8 subindex,
* the mailbox size then the download is segmented. The function will split the
* parameter data in segments and send them to the slave one by one.
*
- * @param[in] context = context struct
- * @param[in] Slave = Slave number
- * @param[in] Index = Index to write
- * @param[in] SubIndex = Subindex to write, must be 0 or 1 if CA is used.
- * @param[in] CA = FALSE = single subindex. TRUE = Complete Access, all subindexes written.
- * @param[in] psize = Size in bytes of parameter buffer.
- * @param[out] p = Pointer to parameter buffer
- * @param[in] Timeout = Timeout in us, standard is EC_TIMEOUTRXM
+ * @param[in] context context struct
+ * @param[in] Slave Slave number
+ * @param[in] Index Index to write
+ * @param[in] SubIndex Subindex to write, must be 0 or 1 if CA is used.
+ * @param[in] CA FALSE = single subindex. TRUE = Complete Access, all subindexes written.
+ * @param[in] psize Size in bytes of parameter buffer.
+ * @param[out] p Pointer to parameter buffer
+ * @param[in] Timeout Timeout in us, standard is EC_TIMEOUTRXM
* @return Workcounter from last slave response
*/
int ecx_SDOwrite(ecx_contextt *context, uint16 Slave, uint16 Index, uint8 SubIndex,
*
* A RxPDO download request is issued.
*
- * @param[in] context = context struct
- * @param[in] Slave = Slave number
- * @param[in] RxPDOnumber = Related RxPDO number
- * @param[in] psize = Size in bytes of PDO buffer.
- * @param[out] p = Pointer to PDO buffer
+ * @param[in] context context struct
+ * @param[in] Slave Slave number
+ * @param[in] RxPDOnumber Related RxPDO number
+ * @param[in] psize Size in bytes of PDO buffer.
+ * @param[out] p Pointer to PDO buffer
* @return Workcounter from last slave response
*/
int ecx_RxPDO(ecx_contextt *context, uint16 Slave, uint16 RxPDOnumber, int psize, const void *p)
*
* A TxPDO download request is issued.
*
- * @param[in] context = context struct
- * @param[in] slave = Slave number
- * @param[in] TxPDOnumber = Related TxPDO number
- * @param[in,out] psize = Size in bytes of PDO buffer, returns bytes read from PDO.
- * @param[out] p = Pointer to PDO buffer
- * @param[in] timeout = Timeout in us, standard is EC_TIMEOUTRXM
+ * @param[in] context context struct
+ * @param[in] slave Slave number
+ * @param[in] TxPDOnumber Related TxPDO number
+ * @param[in,out] psize Size in bytes of PDO buffer, returns bytes read from PDO.
+ * @param[out] p Pointer to PDO buffer
+ * @param[in] timeout Timeout in us, standard is EC_TIMEOUTRXM
* @return Workcounter from last slave response
*/
int ecx_TxPDO(ecx_contextt *context, uint16 slave, uint16 TxPDOnumber, int *psize, void *p, int timeout)
}
/** Read PDO assign structure
- * @param[in] context = context struct
- * @param[in] Slave = Slave number
- * @param[in] PDOassign = PDO assign object
+ * @param[in] context context struct
+ * @param[in] Slave Slave number
+ * @param[in] PDOassign PDO assign object
* @return total bitlength of PDO assign
*/
uint32 ecx_readPDOassign(ecx_contextt *context, uint16 Slave, uint16 PDOassign)
}
/** Read PDO assign structure in Complete Access mode
- * @param[in] context = context struct
- * @param[in] Slave = Slave number
- * @param[in] Thread_n = Calling thread index
- * @param[in] PDOassign = PDO assign object
+ * @param[in] context context struct
+ * @param[in] Slave Slave number
+ * @param[in] Thread_n Calling thread index
+ * @param[in] PDOassign PDO assign object
* @return total bitlength of PDO assign
*/
uint32 ecx_readPDOassignCA(ecx_contextt *context, uint16 Slave, int Thread_n,
* 1A00:00 is number of object defined for this PDO\n
* 1A00:01 object mapping #1, f.e. 60100710 (SDO 6010 SI 07 bitlength 0x10)
*
- * @param[in] context = context struct
- * @param[in] Slave = Slave number
- * @param[out] Osize = Size in bits of output mapping (rxPDO) found
- * @param[out] Isize = Size in bits of input mapping (txPDO) found
+ * @param[in] context context struct
+ * @param[in] Slave Slave number
+ * @param[out] Osize Size in bits of output mapping (rxPDO) found
+ * @param[out] Isize Size in bits of input mapping (txPDO) found
* @return >0 if mapping successful.
*/
int ecx_readPDOmap(ecx_contextt *context, uint16 Slave, uint32 *Osize, uint32 *Isize)
* tries to read them and collect a full input and output mapping size
* of designated slave. Slave has to support CA, otherwise use ec_readPDOmap().
*
- * @param[in] context = context struct
- * @param[in] Slave = Slave number
- * @param[in] Thread_n = Calling thread index
- * @param[out] Osize = Size in bits of output mapping (rxPDO) found
- * @param[out] Isize = Size in bits of input mapping (txPDO) found
+ * @param[in] context context struct
+ * @param[in] Slave Slave number
+ * @param[in] Thread_n Calling thread index
+ * @param[out] Osize Size in bits of output mapping (rxPDO) found
+ * @param[out] Isize Size in bits of input mapping (txPDO) found
* @return >0 if mapping successful.
*/
int ecx_readPDOmapCA(ecx_contextt *context, uint16 Slave, int Thread_n, uint32 *Osize, uint32 *Isize)
/** CoE read Object Description List.
*
- * @param[in] context = context struct
- * @param[in] Slave = Slave number.
- * @param[out] pODlist = resulting Object Description list.
+ * @param[in] context context struct
+ * @param[in] Slave Slave number.
+ * @param[out] pODlist resulting Object Description list.
* @return Workcounter of slave response.
*/
int ecx_readODlist(ecx_contextt *context, uint16 Slave, ec_ODlistt *pODlist)
/** CoE read Object Description. Adds textual description to object indexes.
*
- * @param[in] context = context struct
- * @param[in] Item = Item number in ODlist.
- * @param[in,out] pODlist = referencing Object Description list.
+ * @param[in] context context struct
+ * @param[in] Item Item number in ODlist.
+ * @param[in,out] pODlist referencing Object Description list.
* @return Workcounter of slave response.
*/
int ecx_readODdescription(ecx_contextt *context, uint16 Item, ec_ODlistt *pODlist)
/** CoE read SDO service object entry, single subindex.
* Used in ec_readOE().
*
- * @param[in] context = context struct
- * @param[in] Item = Item in ODlist.
- * @param[in] SubI = Subindex of item in ODlist.
- * @param[in] pODlist = Object description list for reference.
- * @param[out] pOElist = resulting object entry structure.
+ * @param[in] context context struct
+ * @param[in] Item Item in ODlist.
+ * @param[in] SubI Subindex of item in ODlist.
+ * @param[in] pODlist Object description list for reference.
+ * @param[out] pOElist resulting object entry structure.
* @return Workcounter of slave response.
*/
int ecx_readOEsingle(ecx_contextt *context, uint16 Item, uint8 SubI, ec_ODlistt *pODlist, ec_OElistt *pOElist)
/** CoE read SDO service object entry.
*
- * @param[in] context = context struct
- * @param[in] Item = Item in ODlist.
- * @param[in] pODlist = Object description list for reference.
- * @param[out] pOElist = resulting object entry structure.
+ * @param[in] context context struct
+ * @param[in] Item Item in ODlist.
+ * @param[in] pODlist Object description list for reference.
+ * @param[out] pOElist resulting object entry structure.
* @return Workcounter of slave response.
*/
int ecx_readOE(ecx_contextt *context, uint16 Item, ec_ODlistt *pODlist, ec_OElistt *pOElist)
/** Enumerate and init all slaves.
*
- * @param[in] context = context struct
+ * @param[in] context context struct
* @return Workcounter of slave discover datagram = number of slaves found
*/
int ecx_config_init(ecx_contextt *context)
/** Map all PDOs in one group of slaves to IOmap with Outputs/Inputs
* overlapping. NOTE: Must use this for TI ESC when using LRW.
*
- * @param[in] context = context struct
- * @param[out] pIOmap = pointer to IOmap
- * @param[in] group = group to map, 0 = all groups
+ * @param[in] context context struct
+ * @param[out] pIOmap pointer to IOmap
+ * @param[in] group = group to map, 0 all groups
* @return IOmap size
*/
static int ecx_config_overlap_map_group(ecx_contextt *context, void *pIOmap, uint8 group)
* frame. Use this mode for TI ESC when using LRW. Packed mode is not
* possible when overlapped mode is enabled.
*
- * @param[in] context = context struct
- * @param[out] pIOmap = pointer to IOmap
- * @param[in] group = group to map, 0 = all groups
+ * @param[in] context context struct
+ * @param[out] pIOmap pointer to IOmap
+ * @param[in] group group to map, 0 = all groups
* @return IOmap size
*/
int ecx_config_map_group(ecx_contextt *context, void *pIOmap, uint8 group)
/** Recover slave.
*
- * @param[in] context = context struct
- * @param[in] slave = slave to recover
- * @param[in] timeout = local timeout f.e. EC_TIMEOUTRET3
+ * @param[in] context context struct
+ * @param[in] slave slave to recover
+ * @param[in] timeout local timeout f.e. EC_TIMEOUTRET3
* @return >0 if successful
*/
int ecx_recover_slave(ecx_contextt *context, uint16 slave, int timeout)
/** Reconfigure slave.
*
- * @param[in] context = context struct
- * @param[in] slave = slave to reconfigure
- * @param[in] timeout = local timeout f.e. EC_TIMEOUTRET3
+ * @param[in] context context struct
+ * @param[in] slave slave to reconfigure
+ * @param[in] timeout local timeout f.e. EC_TIMEOUTRET3
* @return Slave state
*/
int ecx_reconfig_slave(ecx_contextt *context, uint16 slave, int timeout)
/**
* Set DC of slave to fire sync0 at CyclTime interval with CyclShift offset.
*
- * @param[in] context = context struct
+ * @param[in] context context struct
* @param [in] slave Slave number.
* @param [in] act TRUE = active, FALSE = deactivated
* @param [in] CyclTime Cycltime in ns.
/**
* Set DC of slave to fire sync0 and sync1 at CyclTime interval with CyclShift offset.
*
- * @param[in] context = context struct
+ * @param[in] context context struct
* @param [in] slave Slave number.
* @param [in] act TRUE = active, FALSE = deactivated
* @param [in] CyclTime0 Cycltime SYNC0 in ns.
/**
* Locate DC slaves, measure propagation delays.
*
- * @param[in] context = context struct
+ * @param[in] context context struct
* @return boolean if slaves are found with DC
*/
boolean ecx_configdc(ecx_contextt *context)
#include "oshw.h"
/** EoE utility function to convert uint32 to eoe ip bytes.
- * @param[in] ip = ip in uint32
- * @param[out] byte_ip = eoe ip 4th octet, 3ed octet, 2nd octet, 1st octet
+ * @param[in] ip ip in uint32
+ * @param[out] byte_ip eoe ip 4th octet, 3ed octet, 2nd octet, 1st octet
*/
static void EOE_ip_uint32_to_byte(eoe_ip4_addr_t *ip, uint8_t *byte_ip)
{
}
/** EoE utility function to convert eoe ip bytes to uint32.
- * @param[in] byte_ip = eoe ip 4th octet, 3ed octet, 2nd octet, 1st octet
- * @param[out] ip = ip in uint32
+ * @param[in] byte_ip eoe ip 4th octet, 3ed octet, 2nd octet, 1st octet
+ * @param[out] ip ip in uint32
*/
static void EOE_ip_byte_to_uint32(uint8_t *byte_ip, eoe_ip4_addr_t *ip)
{
/** EoE fragment data handler hook. Should not block.
*
- * @param[in] context = context struct
- * @param[in] hook = Pointer to hook function.
+ * @param[in] context context struct
+ * @param[in] hook Pointer to hook function.
* @return 1
*/
int ecx_EOEdefinehook(ecx_contextt *context, void *hook)
/** EoE EOE set IP, blocking. Waits for response from the slave.
*
- * @param[in] context = Context struct
- * @param[in] slave = Slave number
- * @param[in] port = Port number on slave if applicable
- * @param[in] ipparam = IP parameter data to be sent
- * @param[in] timeout = Timeout in us, standard is EC_TIMEOUTRXM
+ * @param[in] context Context struct
+ * @param[in] slave Slave number
+ * @param[in] port Port number on slave if applicable
+ * @param[in] ipparam IP parameter data to be sent
+ * @param[in] timeout Timeout in us, standard is EC_TIMEOUTRXM
* @return Workcounter from last slave response or returned result code
*/
int ecx_EOEsetIp(ecx_contextt *context, uint16 slave, uint8 port, eoe_param_t *ipparam, int timeout)
/** EoE EOE get IP, blocking. Waits for response from the slave.
*
- * @param[in] context = Context struct
- * @param[in] slave = Slave number
- * @param[in] port = Port number on slave if applicable
- * @param[out] ipparam = IP parameter data retrieved from slave
- * @param[in] timeout = Timeout in us, standard is EC_TIMEOUTRXM
+ * @param[in] context Context struct
+ * @param[in] slave Slave number
+ * @param[in] port Port number on slave if applicable
+ * @param[out] ipparam IP parameter data retrieved from slave
+ * @param[in] timeout Timeout in us, standard is EC_TIMEOUTRXM
* @return Workcounter from last slave response or returned result code
*/
int ecx_EOEgetIp(ecx_contextt *context, uint16 slave, uint8 port, eoe_param_t *ipparam, int timeout)
* several fragments. The function will split the buf data in fragments and
* send them to the slave one by one.
*
- * @param[in] context = context struct
- * @param[in] slave = Slave number
- * @param[in] port = Port number on slave if applicable
- * @param[in] psize = Size in bytes of parameter buffer.
- * @param[in] p = Pointer to parameter buffer
- * @param[in] timeout = Timeout in us, standard is EC_TIMEOUTRXM
+ * @param[in] context context struct
+ * @param[in] slave Slave number
+ * @param[in] port Port number on slave if applicable
+ * @param[in] psize Size in bytes of parameter buffer.
+ * @param[in] p Pointer to parameter buffer
+ * @param[in] timeout Timeout in us, standard is EC_TIMEOUTRXM
* @return Workcounter from last slave transmission
*/
int ecx_EOEsend(ecx_contextt *context, uint16 slave, uint8 port, int psize, void *p, int timeout)
* by several fragments. The function will assamble the fragments into
* a complete Ethernet buffer.
*
- * @param[in] context = context struct
- * @param[in] slave = Slave number
- * @param[in] port = Port number on slave if applicable
- * @param[in,out] psize = Size in bytes of parameter buffer.
- * @param[in] p = Pointer to parameter buffer
- * @param[in] timeout = Timeout in us, standard is EC_TIMEOUTRXM
+ * @param[in] context context struct
+ * @param[in] slave Slave number
+ * @param[in] port Port number on slave if applicable
+ * @param[in,out] psize Size in bytes of parameter buffer.
+ * @param[in] p Pointer to parameter buffer
+ * @param[in] timeout Timeout in us, standard is EC_TIMEOUTRXM
* @return Workcounter from last slave response or error code
*/
int ecx_EOErecv(ecx_contextt *context, uint16 slave, uint8 port, int *psize, void *p, int timeout)
* Will take the data in incoming mailbox buffer and copy to destination
* Ethernet frame buffer at given offset and update current fragment variables
*
- * @param[in] MbxIn = Received mailbox containing fragment data
- * @param[in,out] rxfragmentno = Fragment number
- * @param[in,out] rxframesize = Frame size
- * @param[in,out] rxframeoffset = Frame offset
- * @param[in,out] rxframeno = Frame number
- * @param[in,out] psize = Size in bytes of frame buffer.
- * @param[out] p = Pointer to frame buffer
+ * @param[in] MbxIn Received mailbox containing fragment data
+ * @param[in,out] rxfragmentno Fragment number
+ * @param[in,out] rxframesize Frame size
+ * @param[in,out] rxframeoffset Frame offset
+ * @param[in,out] rxframeno Frame number
+ * @param[in,out] psize Size in bytes of frame buffer.
+ * @param[out] p Pointer to frame buffer
* @return 0= if fragment OK, >0 if last fragment, <0 on error
*/
int ecx_EOEreadfragment(
/** FoE progress hook.
*
- * @param[in] context = context struct
- * @param[in] hook = Pointer to hook function.
+ * @param[in] context context struct
+ * @param[in] hook Pointer to hook function.
* @return 1
*/
int ecx_FOEdefinehook(ecx_contextt *context, void *hook)
/** FoE read, blocking.
*
- * @param[in] context = context struct
- * @param[in] slave = Slave number.
- * @param[in] filename = Filename of file to read.
- * @param[in] password = password.
- * @param[in,out] psize = Size in bytes of file buffer, returns bytes read from file.
- * @param[out] p = Pointer to file buffer
- * @param[in] timeout = Timeout per mailbox cycle in us, standard is EC_TIMEOUTRXM
+ * @param[in] context context struct
+ * @param[in] slave Slave number.
+ * @param[in] filename Filename of file to read.
+ * @param[in] password password.
+ * @param[in,out] psize Size in bytes of file buffer, returns bytes read from file.
+ * @param[out] p Pointer to file buffer
+ * @param[in] timeout Timeout per mailbox cycle in us, standard is EC_TIMEOUTRXM
* @return Workcounter from last slave response
*/
int ecx_FOEread(ecx_contextt *context, uint16 slave, char *filename, uint32 password, int *psize, void *p, int timeout)
buffersize = *psize;
MbxIn = NULL;
MbxOut = NULL;
- /* Empty slave out mailbox if something is in. Timeout set to 0 */
+ /* Empty slave out mailbox if something is in. Timout set to 0 */
wkc = ecx_mbxreceive(context, slave, &MbxIn, 0);
MbxOut = ecx_getmbx(context);
ec_clearmbx(MbxOut);
/** FoE write, blocking.
*
- * @param[in] context = context struct
- * @param[in] slave = Slave number.
- * @param[in] filename = Filename of file to write.
- * @param[in] password = password.
- * @param[in] psize = Size in bytes of file buffer.
- * @param[out] p = Pointer to file buffer
- * @param[in] timeout = Timeout per mailbox cycle in us, standard is EC_TIMEOUTRXM
+ * @param[in] context context struct
+ * @param[in] slave Slave number.
+ * @param[in] filename Filename of file to write.
+ * @param[in] password password.
+ * @param[in] psize Size in bytes of file buffer.
+ * @param[out] p Pointer to file buffer
+ * @param[in] timeout Timeout per mailbox cycle in us, standard is EC_TIMEOUTRXM
* @return Workcounter from last slave response
*/
int ecx_FOEwrite(ecx_contextt *context, uint16 slave, char *filename, uint32 password, int psize, void *p, int timeout)
MbxIn = NULL;
MbxOut = NULL;
- /* Empty slave out mailbox if something is in. Timeout set to 0 */
+ /* Empty slave out mailbox if something is in. Timout set to 0 */
wkc = ecx_mbxreceive(context, slave, &MbxIn, 0);
MbxOut = ecx_getmbx(context);
ec_clearmbx(MbxOut);
/** Free dynamically allocated list over available network adapters.
*
- * @param[in] adapter = Struct holding adapter name, description and pointer to next.
+ * @param[in] adapter Struct holding adapter name, description and pointer to next.
*/
void ec_free_adapters(ec_adaptert *adapter)
{
/** Pushes an error on the error list.
*
- * @param[in] context = context struct
+ * @param[in] context context struct
* @param[in] Ec pointer describing the error.
*/
void ecx_pusherror(ecx_contextt *context, const ec_errort *Ec)
/** Pops an error from the list.
*
- * @param[in] context = context struct
- * @param[out] Ec = Struct describing the error.
+ * @param[in] context context struct
+ * @param[out] Ec Struct describing the error.
* @return TRUE if an error was popped.
*/
boolean ecx_poperror(ecx_contextt *context, ec_errort *Ec)
/** Check if error list has entries.
*
- * @param[in] context = context struct
+ * @param[in] context context struct
* @return TRUE if error list contains entries.
*/
boolean ecx_iserror(ecx_contextt *context)
/** Report packet error
*
- * @param[in] context = context struct
- * @param[in] Slave = Slave number
- * @param[in] Index = Index that generated error
- * @param[in] SubIdx = Subindex that generated error
- * @param[in] ErrorCode = Error code
+ * @param[in] context context struct
+ * @param[in] Slave Slave number
+ * @param[in] Index Index that generated error
+ * @param[in] SubIdx Subindex that generated error
+ * @param[in] ErrorCode Error code
*/
void ecx_packeterror(ecx_contextt *context, uint16 Slave, uint16 Index, uint8 SubIdx, uint16 ErrorCode)
{
/** Report Mailbox Error
*
- * @param[in] context = context struct
- * @param[in] Slave = Slave number
- * @param[in] Detail = Following EtherCAT specification
+ * @param[in] context context struct
+ * @param[in] Slave Slave number
+ * @param[in] Detail Following EtherCAT specification
*/
static void ecx_mbxerror(ecx_contextt *context, uint16 Slave, uint16 Detail)
{
/** Report Mailbox Emergency Error
*
- * @param[in] context = context struct
- * @param[in] Slave = Slave number
- * @param[in] ErrorCode = Following EtherCAT specification
+ * @param[in] context context struct
+ * @param[in] Slave Slave number
+ * @param[in] ErrorCode Following EtherCAT specification
* @param[in] ErrorReg
* @param[in] b1
* @param[in] w1
}
/** Initialise lib in single NIC mode
- * @param[in] context = context struct
- * @param[in] ifname = Dev name, f.e. "eth0"
+ * @param[in] context context struct
+ * @param[in] ifname Dev name, f.e. "eth0"
* @return >0 if OK
*/
int ecx_init(ecx_contextt *context, const char *ifname)
}
/** Initialise lib in redundant NIC mode
- * @param[in] context = context struct
- * @param[in] redport = pointer to redport, redundant port data
- * @param[in] ifname = Primary Dev name, f.e. "eth0"
- * @param[in] if2name = Secondary Dev name, f.e. "eth1"
+ * @param[in] context context struct
+ * @param[in] redport pointer to redport, redundant port data
+ * @param[in] ifname Primary Dev name, f.e. "eth0"
+ * @param[in] if2name Secondary Dev name, f.e. "eth1"
* @return >0 if OK
*/
int ecx_init_redundant(ecx_contextt *context, ecx_redportt *redport, const char *ifname, char *if2name)
}
/** Close lib.
- * @param[in] context = context struct
+ * @param[in] context context struct
*/
void ecx_close(ecx_contextt *context)
{
/**
* Get a mailbox from the mailbox pool.
- * @param[in] context = context struct
+ * @param[in] context context struct
* @return Pointer to the mailbox if available, otherwise NULL.
*/
ec_mbxbuft *ecx_getmbx(ecx_contextt *context)
}
/** Drop a mailbox back to the mailbox pool.
- * @param[in] context = context struct
- * @param[in] mbx = Pointer to mailbox to be dropped
+ * @param[in] context context struct
+ * @param[in] mbx Pointer to mailbox to be dropped
* @return 1 on success, 0 if the mailbox is invalid.
*/
int ecx_dropmbx(ecx_contextt *context, ec_mbxbuft *mbx)
* Sets up the mailbox pool mutex and initializes the empty list with
* all available mailboxes.
*
- * @param[in] context = context struct
+ * @param[in] context context struct
* @return 0 on success.
*/
int ecx_initmbxpool(ecx_contextt *context)
}
/** Initialize mailbox queue.
- * @param[in] context = context struct
- * @param[in] group = group number
+ * @param[in] context context struct
+ * @param[in] group group number
* @return 0 on success.
*/
int ecx_initmbxqueue(ecx_contextt *context, uint8 group)
}
/** Add a mailbox to the queue for a specific slave.
- * @param[in] context = context struct
- * @param[in] slave = Slave number
- * @param[in] mbx = Pointer to mailbox
+ * @param[in] context context struct
+ * @param[in] slave Slave number
+ * @param[in] mbx Pointer to mailbox
* @return Ticket number of the added mailbox, or -1 on failure.
*/
int ecx_mbxaddqueue(ecx_contextt *context, uint16 slave, ec_mbxbuft *mbx)
}
/** Mark a mailbox in the queue as done.
- * @param[in] context = context struct
- * @param[in] slave = Slave number
- * @param[in] ticket = Ticket number of the mailbox
+ * @param[in] context context struct
+ * @param[in] slave Slave number
+ * @param[in] ticket Ticket number of the mailbox
* @return 1 on success, 0 if the ticket is invalid or not done.
*/
int ecx_mbxdonequeue(ecx_contextt *context, uint16 slave, int ticket)
}
/** Expire a mailbox in the queue.
- * @param[in] context = context struct
- * @param[in] slave = Slave number
- * @param[in] ticket = Ticket number of the mailbox
+ * @param[in] context context struct
+ * @param[in] slave Slave number
+ * @param[in] ticket Ticket number of the mailbox
* @return 1 on success, 0 if the ticket is invalid or not expired.
*/
int ecx_mbxexpirequeue(ecx_contextt *context, uint16 slave, int ticket)
}
/** Rotate a mailbox in the queue.
- * @param[in] context = context struct
- * @param[in] group = Group number
- * @param[in] ticketloc = Ticket location in the queue
+ * @param[in] context context struct
+ * @param[in] group Group number
+ * @param[in] ticketloc Ticket location in the queue
* @return 1 on success, 0 if rotation is not possible.
*/
int ecx_mbxrotatequeue(ecx_contextt *context, uint8 group, int ticketloc)
}
/** Set a slave's mailbox to be cyclic.
- * @param[in] context = context struct
- * @param[in] slave = Slave number
+ * @param[in] context context struct
+ * @param[in] slave Slave number
* @return 1 if the mailbox was set to cyclic, 0 if it cannot be set.
*/
int ecx_slavembxcyclic(ecx_contextt *context, uint16 slave)
}
/** Drop a mailbox from the queue.
- * @param[in] context = context struct
- * @param[in] group = Group number
- * @param[in] ticketloc = Ticket location in the queue
+ * @param[in] context context struct
+ * @param[in] group Group number
+ * @param[in] ticketloc Ticket location in the queue
* @return Pointer to the dropped mailbox
*/
ec_mbxbuft *ecx_mbxdropqueue(ecx_contextt *context, uint8 group, int ticketloc)
/** Read one byte from slave EEPROM via cache.
* If the cache location is empty then a read request is made to the slave.
* Depending on the slave capabilities the request is 4 or 8 bytes.
- * @param[in] context = context struct
- * @param[in] slave = slave number
- * @param[in] address = eeprom address in bytes (slave uses words)
+ * @param[in] context context struct
+ * @param[in] slave slave number
+ * @param[in] address eeprom address in bytes (slave uses words)
* @return requested byte, if not available then 0xff
*/
uint8 ecx_siigetbyte(ecx_contextt *context, uint16 slave, uint16 address)
}
/** Find SII section header in slave EEPROM.
- * @param[in] context = context struct
- * @param[in] slave = slave number
- * @param[in] cat = section category
+ * @param[in] context context struct
+ * @param[in] slave slave number
+ * @param[in] cat section category
* @return byte address of section at section length entry, if not available then 0
*/
int16 ecx_siifind(ecx_contextt *context, uint16 slave, uint16 cat)
}
/** Get string from SII string section in slave EEPROM.
- * @param[in] context = context struct
- * @param[out] str = requested string, 0x00 if not found
- * @param[in] slave = slave number
- * @param[in] Sn = string number
+ * @param[in] context context struct
+ * @param[out] str requested string, 0x00 if not found
+ * @param[in] slave slave number
+ * @param[in] Sn string number
*/
void ecx_siistring(ecx_contextt *context, char *str, uint16 slave, uint16 Sn)
{
}
/** Get FMMU data from SII FMMU section in slave EEPROM.
- * @param[in] context = context struct
- * @param[in] slave = slave number
- * @param[out] FMMU = FMMU struct from SII, max. 4 FMMU's
+ * @param[in] context context struct
+ * @param[in] slave slave number
+ * @param[out] FMMU FMMU struct from SII, max. 4 FMMU's
* @return number of FMMU's defined in section
*/
uint16 ecx_siiFMMU(ecx_contextt *context, uint16 slave, ec_eepromFMMUt *FMMU)
}
/** Get SM data from SII SM section in slave EEPROM.
- * @param[in] context = context struct
- * @param[in] slave = slave number
- * @param[out] SM = first SM struct from SII
+ * @param[in] context context struct
+ * @param[in] slave slave number
+ * @param[out] SM first SM struct from SII
* @return number of SM's defined in section
*/
uint16 ecx_siiSM(ecx_contextt *context, uint16 slave, ec_eepromSMt *SM)
}
/** Get next SM data from SII SM section in slave EEPROM.
- * @param[in] context = context struct
- * @param[in] slave = slave number
- * @param[out] SM = first SM struct from SII
- * @param[in] n = SM number
+ * @param[in] context context struct
+ * @param[in] slave slave number
+ * @param[out] SM first SM struct from SII
+ * @param[in] n SM number
* @return >0 if OK
*/
uint16 ecx_siiSMnext(ecx_contextt *context, uint16 slave, ec_eepromSMt *SM, uint16 n)
}
/** Get PDO data from SII PDO section in slave EEPROM.
- * @param[in] context = context struct
- * @param[in] slave = slave number
- * @param[out] PDO = PDO struct from SII
- * @param[in] t = 0=RXPDO 1=TXPDO
+ * @param[in] context context struct
+ * @param[in] slave slave number
+ * @param[out] PDO PDO struct from SII
+ * @param[in] t 0=RXPDO 1=TXPDO
* @return mapping size in bits of PDO
*/
uint32 ecx_siiPDO(ecx_contextt *context, uint16 slave, ec_eepromPDOt *PDO, uint8 t)
/** Read all slave states in slavelist.
* @warning The BOOT state is actually higher than INIT and PRE_OP (see state representation)
- * @param[in] context = context struct
+ * @param[in] context context struct
* @return lowest state found
*/
int ecx_readstate(ecx_contextt *context)
/** Write slave state, if slave = 0 then write to all slaves.
* The function does not check if the actual state is changed.
- * @param[in] context = context struct
- * @param[in] slave = Slave number, 0 = master
+ * @param[in] context context struct
+ * @param[in] slave Slave number, 0 master
* @return Workcounter or EC_NOFRAME
*/
int ecx_writestate(ecx_contextt *context, uint16 slave)
* This has some implications for the BOOT state. The Boot state representation collides with INIT | PRE_OP so this
* function cannot be used for slave = 0 and reqstate = EC_STATE_BOOT and also, if the returned state is BOOT, some
* slaves might actually be in INIT and PRE_OP and not in BOOT.
- * @param[in] context = context struct
- * @param[in] slave = Slave number, 0 = all slaves (only the "slavelist[0].state" is refreshed)
- * @param[in] reqstate = Requested state
- * @param[in] timeout = Timeout value in us
+ * @param[in] context context struct
+ * @param[in] slave Slave number, 0 all slaves (only the "slavelist[0].state" is refreshed)
+ * @param[in] reqstate Requested state
+ * @param[in] timeout Timeout value in us
* @return Requested state, or found state after timeout.
*/
uint16 ecx_statecheck(ecx_contextt *context, uint16 slave, uint16 reqstate, int timeout)
/** Get index of next mailbox counter value.
* Used for Mailbox Link Layer.
- * @param[in] cnt = Mailbox counter value [0..7]
+ * @param[in] cnt Mailbox counter value [0..7]
* @return next mailbox counter value
*/
uint8 ec_nextmbxcnt(uint8 cnt)
}
/** Clear mailbox buffer.
- * @param[out] Mbx = Mailbox buffer to clear
+ * @param[out] Mbx Mailbox buffer to clear
*/
void ec_clearmbx(ec_mbxbuft *Mbx)
{
}
/** Clear mailbox status for a specific group.
- * @param[in] context = context struct
- * @param[in] group = Group number
+ * @param[in] context context struct
+ * @param[in] group Group number
* @return 1 if successfully cleared, 0 otherwise
*/
int ecx_clearmbxstatus(ecx_contextt *context, uint8 group)
/**
* Read mailbox status from slave.
*
- * @param[in] context = context struct
- * @param[in] slave = Slave number
- * @param[out] SMstat = Pointer to store mailbox status
+ * @param[in] context context struct
+ * @param[in] slave Slave number
+ * @param[out] SMstat Pointer to store mailbox status
* @return Workcounter or EC_NOFRAME
*/
int ecx_readmbxstatus(ecx_contextt *context, uint16 slave, uint8 *SMstat)
/**
* Read extended mailbox status for a specified slave.
- * @param[in] context = context struct
- * @param[in] slave = Slave number
- * @param[out] SMstatex = Pointer to store extended mailbox status
+ * @param[in] context context struct
+ * @param[in] slave Slave number
+ * @param[out] SMstatex Pointer to store extended mailbox status
* @return Workcounter from slave response
*/
int ecx_readmbxstatusex(ecx_contextt *context, uint16 slave, uint16 *SMstatex)
}
/** Check if IN mailbox of slave is empty.
- * @param[in] context = context struct
- * @param[in] slave = Slave number
- * @param[in] timeout = Timeout in us
+ * @param[in] context context struct
+ * @param[in] slave Slave number
+ * @param[in] timeout Timeout in us
* @return >0 is success
*/
int ecx_mbxempty(ecx_contextt *context, uint16 slave, int timeout)
* track of a work limit to prevent excessive processing in a single
* call.
*
- * @param[in] context = context struct
- * @param[in] group = group number
- * @param[in] limit = maximum number of mailbox operations to process
+ * @param[in] context context struct
+ * @param[in] group group number
+ * @param[in] limit maximum number of mailbox operations to process
* @return Number of mailbox operations processed
*/
int ecx_mbxinhandler(ecx_contextt *context, uint8 group, int limit)
* checking the state of each message in the queue and sending appropriate
* requests to the slaves. It supports retrying for failed requests.
*
- * @param[in] context = context struct
- * @param[in] group = group number
- * @param[in] limit = maximum number of mailboxes to process
+ * @param[in] context context struct
+ * @param[in] group group number
+ * @param[in] limit maximum number of mailboxes to process
* @return Number of processed mailboxes
*/
int ecx_mbxouthandler(ecx_contextt *context, uint8 group, int limit)
* It first handles incoming messages and then uses the remaining limit
* for outgoing messages.
*
- * @param[in] context Pointer to the context structure.
+ * @param[in] context context tructure.
* @param[in] group Group number.
* @param[in] limit The maximum number of mailboxes to process.
*
/** Write IN mailbox to slave.
* Mailbox is fetched from pool by caller, ownership is transferred and dropped back to pool automatically.
- * @param[in] context = context struct
- * @param[in] slave = Slave number
- * @param[out] mbx = Pointer to mailbox data
- * @param[in] timeout = Timeout in us
+ * @param[in] context context struct
+ * @param[in] slave Slave number
+ * @param[out] mbx Pointer to mailbox data
+ * @param[in] timeout Timeout in us
* @return Work counter (>0 is success)
*/
int ecx_mbxsend(ecx_contextt *context, uint16 slave, ec_mbxbuft *mbx, int timeout)
* Supports Mailbox Link Layer with repeat requests.
* Mailbox is fetched from pool, caller is owner after return
* and therefore should drop it back to the pool when finished.
- * @param[in] context = context struct
- * @param[in] slave = Slave number
- * @param[out] mbx = Double pointer to mailbox data
- * @param[in] timeout = Timeout in us
+ * @param[in] context context struct
+ * @param[in] slave Slave number
+ * @param[out] mbx Double pointer to mailbox data
+ * @param[in] timeout Timeout in us
* @return Work counter (>0 is success)
*/
int ecx_mbxreceive(ecx_contextt *context, uint16 slave, ec_mbxbuft **mbx, int timeout)
/** Send ENI mailbox protocol initcmds to a slave for a given transition.
* Currently, only CoE commands are supported.
- * @param[in] context = context struct
- * @param[in] slave = Slave number
- * @param[in] transition = transition (ECT_ESMTRANS_*) for which to send commands
+ * @param[in] context context struct
+ * @param[in] slave Slave number
+ * @param[in] transition transition (ECT_ESMTRANS_*) for which to send commands
* @return 1 on success, 0 on failure
*/
int ecx_mbxENIinitcmds(ecx_contextt *context, uint16 slave, uint16_t transition)
}
/** Dump complete EEPROM data from slave in buffer.
- * @param[in] context = context struct
- * @param[in] slave = Slave number
- * @param[out] esibuf = EEPROM data buffer, make sure it is big enough.
+ * @param[in] context context struct
+ * @param[in] slave Slave number
+ * @param[out] esibuf EEPROM data buffer, make sure it is big enough.
*/
void ecx_esidump(ecx_contextt *context, uint16 slave, uint8 *esibuf)
{
}
/** Read EEPROM from slave bypassing cache.
- * @param[in] context = context struct
- * @param[in] slave = Slave number
- * @param[in] eeproma = (WORD) Address in the EEPROM
- * @param[in] timeout = Timeout in us.
+ * @param[in] context context struct
+ * @param[in] slave Slave number
+ * @param[in] eeproma (WORD) Address in the EEPROM
+ * @param[in] timeout Timeout in us.
* @return EEPROM data 32bit
*/
uint32 ecx_readeeprom(ecx_contextt *context, uint16 slave, uint16 eeproma, int timeout)
}
/** Write EEPROM to slave bypassing cache.
- * @param[in] context = context struct
- * @param[in] slave = Slave number
- * @param[in] eeproma = (WORD) Address in the EEPROM
- * @param[in] data = 16bit data
- * @param[in] timeout = Timeout in us.
+ * @param[in] context context struct
+ * @param[in] slave Slave number
+ * @param[in] eeproma (WORD) Address in the EEPROM
+ * @param[in] data 16bit data
+ * @param[in] timeout Timeout in us.
* @return >0 if OK
*/
int ecx_writeeeprom(ecx_contextt *context, uint16 slave, uint16 eeproma, uint16 data, int timeout)
}
/** Set eeprom control to master. Only if set to PDI.
- * @param[in] context = context struct
- * @param[in] slave = Slave number
+ * @param[in] context context struct
+ * @param[in] slave Slave number
* @return >0 if OK
*/
int ecx_eeprom2master(ecx_contextt *context, uint16 slave)
}
/** Set eeprom control to PDI. Only if set to master.
- * @param[in] context = context struct
- * @param[in] slave = Slave number
+ * @param[in] context context struct
+ * @param[in] slave Slave number
* @return >0 if OK
*/
int ecx_eeprom2pdi(ecx_contextt *context, uint16 slave)
}
/** Read EEPROM from slave bypassing cache. APRD method.
- * @param[in] context = context struct
- * @param[in] aiadr = auto increment address of slave
- * @param[in] eeproma = (WORD) Address in the EEPROM
- * @param[in] timeout = Timeout in us.
+ * @param[in] context context struct
+ * @param[in] aiadr auto increment address of slave
+ * @param[in] eeproma (WORD) Address in the EEPROM
+ * @param[in] timeout Timeout in us.
* @return EEPROM data 64bit or 32bit
*/
uint64 ecx_readeepromAP(ecx_contextt *context, uint16 aiadr, uint16 eeproma, int timeout)
}
/** Write EEPROM to slave bypassing cache. APWR method.
- * @param[in] context = context struct
- * @param[in] aiadr = configured address of slave
- * @param[in] eeproma = (WORD) Address in the EEPROM
- * @param[in] data = 16bit data
- * @param[in] timeout = Timeout in us.
+ * @param[in] context context struct
+ * @param[in] aiadr configured address of slave
+ * @param[in] eeproma (WORD) Address in the EEPROM
+ * @param[in] data 16bit data
+ * @param[in] timeout Timeout in us.
* @return >0 if OK
*/
int ecx_writeeepromAP(ecx_contextt *context, uint16 aiadr, uint16 eeproma, uint16 data, int timeout)
}
/** Read EEPROM from slave bypassing cache. FPRD method.
- * @param[in] context = context struct
- * @param[in] configadr = configured address of slave
- * @param[in] eeproma = (WORD) Address in the EEPROM
- * @param[in] timeout = Timeout in us.
+ * @param[in] context context struct
+ * @param[in] configadr configured address of slave
+ * @param[in] eeproma (WORD) Address in the EEPROM
+ * @param[in] timeout Timeout in us.
* @return EEPROM data 64bit or 32bit
*/
uint64 ecx_readeepromFP(ecx_contextt *context, uint16 configadr, uint16 eeproma, int timeout)
}
/** Write EEPROM to slave bypassing cache. FPWR method.
- * @param[in] context = context struct
- * @param[in] configadr = configured address of slave
- * @param[in] eeproma = (WORD) Address in the EEPROM
- * @param[in] data = 16bit data
- * @param[in] timeout = Timeout in us.
+ * @param[in] context context struct
+ * @param[in] configadr configured address of slave
+ * @param[in] eeproma (WORD) Address in the EEPROM
+ * @param[in] data 16bit data
+ * @param[in] timeout Timeout in us.
* @return >0 if OK
*/
int ecx_writeeepromFP(ecx_contextt *context, uint16 configadr, uint16 eeproma, uint16 data, int timeout)
/** Read EEPROM from slave bypassing cache.
* Parallel read step 1, make request to slave.
- * @param[in] context = context struct
- * @param[in] slave = Slave number
- * @param[in] eeproma = (WORD) Address in the EEPROM
+ * @param[in] context context struct
+ * @param[in] slave Slave number
+ * @param[in] eeproma (WORD) Address in the EEPROM
*/
void ecx_readeeprom1(ecx_contextt *context, uint16 slave, uint16 eeproma)
{
/** Read EEPROM from slave bypassing cache.
* Parallel read step 2, actual read from slave.
- * @param[in] context = context struct
- * @param[in] slave = Slave number
- * @param[in] timeout = Timeout in us.
+ * @param[in] context context struct
+ * @param[in] slave Slave number
+ * @param[in] timeout Timeout in us.
* @return EEPROM data 32bit
*/
uint32 ecx_readeeprom2(ecx_contextt *context, uint16 slave, int timeout)
}
/** Push index of segmented LRD/LWR/LRW combination.
- * @param[in] context = context struct
- * @param[in] idx = Used datagram index.
- * @param[in] data = Pointer to process data segment.
- * @param[in] length = Length of data segment in bytes.
- * @param[in] DCO = Offset position of DC frame.
+ * @param[in] context context struct
+ * @param[in] idx Used datagram index.
+ * @param[in] data Pointer to process data segment.
+ * @param[in] length Length of data segment in bytes.
+ * @param[in] DCO Offset position of DC frame.
*/
static void ecx_pushindex(ecx_contextt *context, uint8 idx, void *data, uint16 length, uint16 DCO)
{
}
/** Pull index of segmented LRD/LWR/LRW combination.
- * @param[in] context = context struct
+ * @param[in] context context struct
* @return Stack location, -1 if stack is empty.
*/
static int ecx_pullindex(ecx_contextt *context)
/**
* Clear the idx stack.
*
- * @param context = context struct
+ * @param context context struct
*/
static void ecx_clearindex(ecx_contextt *context)
{
* In contrast to the base LRW function this function is non-blocking.
* If the processdata does not fit in one datagram, multiple are used.
* In order to recombine the slave response, a stack is used.
- * @param[in] context = context struct
- * @param[in] group = group number
+ * @param[in] context context struct
+ * @param[in] group group number
* @return >0 if processdata is transmitted.
*/
int ecx_send_processdata_group(ecx_contextt *context, uint8 group)
* Second part from ec_send_processdata().
* Received datagrams are recombined with the processdata with help from the stack.
* If a datagram contains input processdata it copies it to the processdata structure.
- * @param[in] context = context struct
- * @param[in] group = group number
- * @param[in] timeout = Timeout in us.
+ * @param[in] context context struct
+ * @param[in] group group number
+ * @param[in] timeout Timeout in us.
* @return Work counter.
*/
int ecx_receive_processdata_group(ecx_contextt *context, uint8 group, int timeout)
/**
* Send processdata to slaves.
* Group number is zero (default).
- * @param[in] context = context struct
+ * @param[in] context context struct
* @return Work counter.
*/
int ecx_send_processdata(ecx_contextt *context)
/**
* Receive processdata from slaves.
* Group number is zero (default).
- * @param[in] context = context struct
- * @param[in] timeout = Timeout in us.
+ * @param[in] context context struct
+ * @param[in] timeout Timeout in us.
* @return Work counter.
*/
int ecx_receive_processdata(ecx_contextt *context, int timeout)
/** Look up text string that belongs to SDO error code.
*
- * @param[in] sdoerrorcode = SDO error code as defined in EtherCAT protocol
+ * @param[in] sdoerrorcode SDO error code as defined in EtherCAT protocol
* @return readable string
*/
const char *ec_sdoerror2string(uint32 sdoerrorcode)
/** Look up text string that belongs to AL status code.
*
- * @param[in] ALstatuscode = AL status code as defined in EtherCAT protocol
+ * @param[in] ALstatuscode AL status code as defined in EtherCAT protocol
* @return readable string
*/
char *ec_ALstatuscode2string(uint16 ALstatuscode)
/** Look up text string that belongs to SoE error code.
*
- * @param[in] errorcode = SoE error code as defined in EtherCAT protocol
+ * @param[in] errorcode SoE error code as defined in EtherCAT protocol
* @return readable string
*/
char *ec_soeerror2string(uint16 errorcode)
/** Look up text string that belongs to MBX error code.
*
- * @param[in] errorcode = MBX error code as defined in EtherCAT protocol
+ * @param[in] errorcode MBX error code as defined in EtherCAT protocol
* @return readable string
*/
char *ec_mbxerror2string(uint16 errorcode)
/** Convert an error to text string.
*
- * @param[in] Ec = Struct describing the error.
+ * @param[in] Ec Struct describing the error.
* @return readable string
*/
char *ecx_err2string(const ec_errort Ec)
/** Look up error in ec_errorlist and convert to text string.
*
- * @param[in] context = context struct
+ * @param[in] context context struct
* @return readable string
*/
char *ecx_elist2string(ecx_contextt *context)
/** Report SoE error.
*
- * @param[in] context = context struct
- * @param[in] Slave = Slave number
- * @param[in] idn = IDN that generated error
- * @param[in] Error = Error code, see EtherCAT documentation for list
+ * @param[in] context context struct
+ * @param[in] Slave Slave number
+ * @param[in] idn IDN that generated error
+ * @param[in] Error Error code, see EtherCAT documentation for list
*/
void ecx_SoEerror(ecx_contextt *context, uint16 Slave, uint16 idn, uint16 Error)
{
* is larger than the mailbox size then the response is segmented. The function
* will combine all segments and copy them to the parameter buffer.
*
- * @param[in] context = context struct
- * @param[in] slave = Slave number
- * @param[in] driveNo = Drive number in slave
- * @param[in] elementflags = Flags to select what properties of IDN are to be transferred.
- * @param[in] idn = IDN.
- * @param[in,out] psize = Size in bytes of parameter buffer, returns bytes read from SoE.
- * @param[out] p = Pointer to parameter buffer
- * @param[in] timeout = Timeout in us, standard is EC_TIMEOUTRXM
+ * @param[in] context context struct
+ * @param[in] slave Slave number
+ * @param[in] driveNo Drive number in slave
+ * @param[in] elementflags Flags to select what properties of IDN are to be transferred.
+ * @param[in] idn IDN.
+ * @param[in,out] psize Size in bytes of parameter buffer, returns bytes read from SoE.
+ * @param[out] p Pointer to parameter buffer
+ * @param[in] timeout Timeout in us, standard is EC_TIMEOUTRXM
* @return Workcounter from last slave response
*/
int ecx_SoEread(ecx_contextt *context, uint16 slave, uint8 driveNo, uint8 elementflags, uint16 idn, int *psize, void *p, int timeout)
* The IDN object of the selected slave and DriveNo is written. If a response
* is larger than the mailbox size then the response is segmented.
*
- * @param[in] context = context struct
- * @param[in] slave = Slave number
- * @param[in] driveNo = Drive number in slave
- * @param[in] elementflags = Flags to select what properties of IDN are to be transferred.
- * @param[in] idn = IDN.
- * @param[in] psize = Size in bytes of parameter buffer.
- * @param[out] p = Pointer to parameter buffer
- * @param[in] timeout = Timeout in us, standard is EC_TIMEOUTRXM
+ * @param[in] context context struct
+ * @param[in] slave Slave number
+ * @param[in] driveNo Drive number in slave
+ * @param[in] elementflags Flags to select what properties of IDN are to be transferred.
+ * @param[in] idn IDN.
+ * @param[in] psize Size in bytes of parameter buffer.
+ * @param[out] p Pointer to parameter buffer
+ * @param[in] timeout Timeout in us, standard is EC_TIMEOUTRXM
* @return Workcounter from last slave response
*/
int ecx_SoEwrite(ecx_contextt *context, uint16 slave, uint8 driveNo, uint8 elementflags, uint16 idn, int psize, void *p, int timeout)
* tries to read them and collect a full input and output mapping size
* of designated slave.
*
- * @param[in] context = context struct
- * @param[in] slave = Slave number
- * @param[out] Osize = Size in bits of output mapping (MTD) found
- * @param[out] Isize = Size in bits of input mapping (AT) found
+ * @param[in] context context struct
+ * @param[in] slave Slave number
+ * @param[out] Osize Size in bits of output mapping (MTD) found
+ * @param[out] Isize Size in bits of input mapping (AT) found
* @return >0 if mapping successful.
*/
int ecx_readIDNmap(ecx_contextt *context, uint16 slave, uint32 *Osize, uint32 *Isize)