Logo
UNICENS V2.3.0-4567
User Manual and API Reference
Ucs_Return_t Ucs_Xrm_Stream_SetPortConfig ( Ucs_Inst_t self,
uint16_t  node_address,
uint8_t  index,
Ucs_Stream_PortOpMode_t  op_mode,
Ucs_Stream_PortOption_t  port_option,
Ucs_Stream_PortClockMode_t  clock_mode,
Ucs_Stream_PortClockDataDelay_t  clock_data_delay,
Ucs_Xrm_Stream_PortCfgResCb_t  result_fptr 
)

This function is used to configure a Streaming Port.

 This function corresponds with the INIC function INIC.StreamPortConfiguration.
Parameters
selfThe UNICENS instance pointer
node_addressDevice address of the target. Use the UCS_ADDR_LOCAL_NODE macro to target the local device.
The following address ranges are supported:
  • [0x10 ... 0x2FF]
  • [0x500 ... 0xFEF]
  • UCS_ADDR_LOCAL_NODE
indexStreaming Port instance.
 Index
op_modeOperation mode of the Streaming Port.
 OperationMode
port_optionDirection of the Streaming Port.
 PortOptions
clock_modeConfiguration of the FSY/SCK signals.
 ClockMode
clock_data_delayConfiguration of the FSY/SCK signals for Generic Streaming.
 ClockDataDelay
result_fptrRequired result callback
Returns
Possible return values are shown in the table below.
Value Description
UCS_RET_SUCCESS No error
UCS_RET_ERR_PARAM The parameter self is NULL.
UCS_RET_ERR_BUFFER_OVERFLOW No message buffer is available.
UCS_RET_ERR_NOT_SUPPORTED API is not supported in the current Network Supervisor Mode.
UCS_RET_ERR_NOT_INITIALIZED UNICENS is not initialized.
 See also section Ucs_Xrm_Stream_SetPortConfig for an example implementation.