Port Entity¶
See the Port Entity for generic information.
- group PortEntity
The Port Entity provides software control over the most basic items related to a USB Port. This includes everything from the complete enable and disable of the entire port to the individual control of specific pins. Voltage and Current measurements are also included for devices which support the Port Entity.
-
void port_getVbusVoltage(unsigned int *id, struct Result *result, const int index)¶
Gets the Vbus Voltage
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: The voltage in microvolts (1 == 1e-6V) currently present on Vbus.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_getVbusCurrent(unsigned int *id, struct Result *result, const int index)¶
Gets the Vbus Current
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: The current in microamps (1 == 1e-6A) currently present on Vbus.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_getVconnVoltage(unsigned int *id, struct Result *result, const int index)¶
Gets the Vconn Voltage
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: The voltage in microvolts (1 == 1e-6V) currently present on Vconn.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_getVconnCurrent(unsigned int *id, struct Result *result, const int index)¶
Gets the Vconn Current
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: The current in microamps (1 == 1e-6A) currently present on Vconn.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_getPowerMode(unsigned int *id, struct Result *result, const int index)¶
Gets the Port Power Mode: Convenience Function of get/setPortMode
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: The current power mode.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setPowerMode(unsigned int *id, struct Result *result, const int index, const unsigned char powerMode)¶
Sets the Port Power Mode: Convenience Function of get/setPortMode
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
powerMode – The power mode to be set.
-
void port_getEnabled(unsigned int *id, struct Result *result, const int index)¶
Gets the current enable value of the port.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: 1 = Fully enabled port; 0 = One or more disabled components.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setEnabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)¶
Enables or disables the entire port.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
enable – 1 = Fully enable port; 0 = Fully disable port.
-
void port_getDataEnabled(unsigned int *id, struct Result *result, const int index)¶
Gets the current enable value of the data lines. Sub-component (Data) of getEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: 1 = Data enabled; 0 = Data disabled.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setDataEnabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)¶
Enables or disables the data lines. Sub-component (Data) of setEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
enable – 1 = Enable data; 0 = Disable data.
-
void port_getDataHSEnabled(unsigned int *id, struct Result *result, const int index)¶
Gets the current enable value of the High Speed (HS) data lines. Sub-component of getDataEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: 1 = Data enabled; 0 = Data disabled.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setDataHSEnabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)¶
Enables or disables the High Speed (HS) data lines. Sub-component of setDataEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
enable – 1 = Enable data; 0 = Disable data.
-
void port_getDataHS1Enabled(unsigned int *id, struct Result *result, const int index)¶
Gets the current enable value of the High Speed A side (HSA) data lines. Sub-component of getDataHSEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: 1 = Data enabled; 0 = Data disabled.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setDataHS1Enabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)¶
Enables or disables the High Speed A side (HSA) data lines. Sub-component of setDataHSEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
enable – 1 = Enable data; 0 = Disable data.
-
void port_getDataHS2Enabled(unsigned int *id, struct Result *result, const int index)¶
Gets the current enable value of the High Speed B side (HSB) data lines. Sub-component of getDataHSEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: 1 = Data enabled; 0 = Data disabled.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setDataHS2Enabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)¶
Enables or disables the High Speed B side (HSB) data lines. Sub-component of setDataHSEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
enable – 1 = Enable data; 0 = Disable data.
-
void port_getDataSSEnabled(unsigned int *id, struct Result *result, const int index)¶
Gets the current enable value of the Super Speed (SS) data lines. Sub-component of getDataEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: 1 = Data enabled; 0 = Data disabled.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setDataSSEnabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)¶
Enables or disables the Super Speed (SS) data lines. Sub-component of setDataEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
enable – 1 = Enable data; 0 = Disable data.
-
void port_getDataSS1Enabled(unsigned int *id, struct Result *result, const int index)¶
Gets the current enable value of the Super Speed A side (SSA) data lines. Sub-component of getDataSSEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: 1 = Data enabled; 0 = Data disabled.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setDataSS1Enabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)¶
Enables or disables the Super Speed (SS) data lines. Sub-component of setDataEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
enable – 1 = Enable data; 0 = Disable data.
-
void port_getDataSS2Enabled(unsigned int *id, struct Result *result, const int index)¶
Gets the current enable value of the Super Speed B side (SSB) data lines. Sub-component of getDataSSEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: 1 = Data enabled; 0 = Data disabled.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setDataSS2Enabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)¶
Enables or disables the Super Speed B side (SSB) data lines. Sub-component of setDataSSEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
enable – 1 = Enable data; 0 = Disable data.
-
void port_getPowerEnabled(unsigned int *id, struct Result *result, const int index)¶
Gets the current enable value of the power lines. Sub-component (Power) of getEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: 1 = Power enabled; 0 = Power disabled.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setPowerEnabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)¶
Enables or Disables the power lines. Sub-component (Power) of setEnable.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
enable – 1 = Enable power; 0 = Disable disable.
-
void port_getDataRole(unsigned int *id, struct Result *result, const int index)¶
Gets the Port Data Role.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: The data role to be set. See datasheet for details.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_getVconnEnabled(unsigned int *id, struct Result *result, const int index)¶
Gets the current enable value of the Vconn lines. Sub-component (Vconn) of getEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: 1 = Vconn enabled; 0 = Vconn disabled.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setVconnEnabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)¶
Enables or disables the Vconn lines. Sub-component (Vconn) of setEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
enable – 1 = Enable Vconn lines; 0 = Disable Vconn lines.
-
void port_getVconn1Enabled(unsigned int *id, struct Result *result, const int index)¶
Gets the current enable value of the Vconn1 lines. Sub-component of getVconnEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: 1 = Vconn1 enabled; 0 = Vconn1 disabled.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setVconn1Enabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)¶
Enables or disables the Vconn1 lines. Sub-component of setVconnEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
enable – 1 = Enable Vconn1 lines; 0 = Disable Vconn1 lines.
-
void port_getVconn2Enabled(unsigned int *id, struct Result *result, const int index)¶
Gets the current enable value of the Vconn2 lines. Sub-component of getVconnEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: 1 = Vconn2 enabled; 0 = Vconn2 disabled.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setVconn2Enabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)¶
Enables or disables the Vconn2 lines. Sub-component of setVconnEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
enable – 1 = Enable Vconn2 lines; 0 = Disable Vconn2 lines.
-
void port_getCCEnabled(unsigned int *id, struct Result *result, const int index)¶
Gets the current enable value of the CC lines. Sub-component (CC) of getEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: 1 = CC enabled; 0 = CC disabled.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setCCEnabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)¶
Enables or disables the CC lines. Sub-component (CC) of setEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
enable – 1 = Enable CC lines; 0 = Disable CC lines.
-
void port_getCC1Enabled(unsigned int *id, struct Result *result, const int index)¶
Gets the current enable value of the CC1 lines. Sub-component of getCCEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: 1 = CC1 enabled; 0 = CC1 disabled.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setCC1Enabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)¶
Enables or disables the CC1 lines. Sub-component of setCCEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
enable – 1 = Enable CC1 lines; 0 = Disable CC1 lines.
-
void port_getCC2Enabled(unsigned int *id, struct Result *result, const int index)¶
Gets the current enable value of the CC2 lines. Sub-component of getCCEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: 1 = CC2 enabled; 0 = CC2 disabled.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setCC2Enabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)¶
Enables or disables the CC2 lines. Sub-component of setCCEnabled.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
enable – 1 = Enable CC2 lines; 0 = Disable CC2 lines.
-
void port_getVoltageSetpoint(unsigned int *id, struct Result *result, const int index)¶
Gets the current voltage setpoint value for the port.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: the voltage setpoint of the port in uV.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setVoltageSetpoint(unsigned int *id, struct Result *result, const int index, const unsigned int value)¶
Sets the current voltage setpoint value for the port.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
value – the voltage setpoint of the port in uV.
-
void port_getState(unsigned int *id, struct Result *result, const int index)¶
A bit mapped representation of the current state of the port. Reflects what he port IS which may differ from what was requested.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: Variable to be filled with the current state.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_getDataSpeed(unsigned int *id, struct Result *result, const int index)¶
Gets the speed of the enumerated device.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: Bit mapped value representing the devices speed. See “Devices” reference for details.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_getMode(unsigned int *id, struct Result *result, const int index)¶
Gets current mode of the port
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: Bit mapped value representing the ports mode. See “Devices” reference for details.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setMode(unsigned int *id, struct Result *result, const int index, const unsigned int mode)¶
Sets the mode of the port
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
mode – Port mode to be set. See “Devices” documentation for details.
-
void port_getErrors(unsigned int *id, struct Result *result, const int index)¶
Returns any errors that are present on the port. Calling this function will clear the current errors. If the error persists it will be set again.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: Bit mapped field representing the current errors of the ports
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_getCurrentLimit(unsigned int *id, struct Result *result, const int index)¶
Gets the current limit of the port.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: Variable to be filled with the limit in microAmps (uA).
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setCurrentLimit(unsigned int *id, struct Result *result, const int index, const unsigned int limit)¶
Sets the current limit of the port.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
limit – Current limit to be applied in microAmps (uA).
-
void port_getCurrentLimitMode(unsigned int *id, struct Result *result, const int index)¶
Gets the current limit mode. The mode determines how the port will react to an over current condition.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: Variable to be filled with an enumerated representation of the current limit mode. Available modes are product specific. See the reference documentation.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setCurrentLimitMode(unsigned int *id, struct Result *result, const int index, const unsigned char mode)¶
Sets the current limit mode. The mode determines how the port will react to an over current condition.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
mode – An enumerated representation of the current limit mode. Available modes are product specific. See the reference documentation.
-
void port_getAvailablePower(unsigned int *id, struct Result *result, const int index)¶
Gets the current available power. This value is determined by the power manager which is responsible for budgeting the systems available power envelope.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: Variable to be filled with the available power in milli-watts (mW).
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_getAllocatedPower(unsigned int *id, struct Result *result, const int index)¶
Gets the currently allocated power This value is determined by the power manager which is responsible for budgeting the systems available power envelope.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: Variable to be filled with the allocated power in milli-watts (mW).
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_getPowerLimit(unsigned int *id, struct Result *result, const int index)¶
Gets the user defined power limit for the port.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: Variable to be filled with the power limit in milli-watts (mW).
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setPowerLimit(unsigned int *id, struct Result *result, const int index, const unsigned int limit)¶
Sets a user defined power limit for the port.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
limit – Power limit to be applied in milli-watts (mW).
-
void port_getPowerLimitMode(unsigned int *id, struct Result *result, const int index)¶
Gets the power limit mode. The mode determines how the port will react to an over power condition.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: Variable to be filled with an enumerated representation of the power limit mode. Available modes are product specific. See the reference documentation.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setPowerLimitMode(unsigned int *id, struct Result *result, const int index, const unsigned char mode)¶
Sets the power limit mode. The mode determines how the port will react to an over power condition.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
mode – An enumerated representation of the power limit mode to be applied Available modes are product specific. See the reference documentation.
-
void port_getName(unsigned int *id, struct Result *result, const int index, unsigned char *buffer, const unsigned int bufferLength)¶
Gets a user defined name of the port. Helpful for identifying ports/devices in a static environment.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: Length that was actually received and filled.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
buffer – pointer to the start of a c style buffer to be filled
bufferLength – Length of the buffer to be filed
-
void port_setName(unsigned int *id, struct Result *result, const int index, const unsigned char *buffer, const unsigned int bufferLength)¶
Sets a user defined name of the port. Helpful for identifying ports/devices in a static environment.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
buffer – Pointer to the start of a c style buffer to be transferred.
bufferLength – Length of the buffer to be transferred.
-
void port_getCCCurrentLimit(unsigned int *id, struct Result *result, const int index)¶
Gets the CC Current Limit Resistance The CC Current limit is the value that’s set for the pull up resistance on the CC lines for basic USB-C negotations.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: Variable to be filled with an enumerated representation of the CC Current limit.
0 = None
1 = Default (500/900mA)
2 = 1.5A
3 = 3.0A
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setCCCurrentLimit(unsigned int *id, struct Result *result, const int index, const unsigned char value)¶
Sets the CC Current Limit Resistance The CC Current limit is the value that’s set for the pull up resistance on the CC lines for basic USB-C negotations.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
value – Variable to be filled with an enumerated representation of the CC Current limit.
0 = None
1 = Default (500/900mA)
2 = 1.5A
3 = 3.0A
-
void port_getDataHSRoutingBehavior(unsigned int *id, struct Result *result, const int index)¶
Gets the HighSpeed Data Routing Behavior. The mode determines how the port will route the data lines.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: Variable to be filled with an enumerated representation of the routing behavior. Available modes are product specific. See the reference documentation.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setDataHSRoutingBehavior(unsigned int *id, struct Result *result, const int index, const unsigned char mode)¶
Sets the HighSpeed Data Routing Behavior. The mode determines how the port will route the data lines.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
mode – An enumerated representation of the routing behavior. Available modes are product specific. See the reference documentation.
-
void port_getDataSSRoutingBehavior(unsigned int *id, struct Result *result, const int index)¶
Gets the SuperSpeed Data Routing Behavior. The mode determines how the port will route the data lines.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: Variable to be filled with an enumerated representation of the routing behavior. Available modes are product specific. See the reference documentation.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setDataSSRoutingBehavior(unsigned int *id, struct Result *result, const int index, const unsigned char mode)¶
Sets the SuperSpeed Data Routing Behavior. The mode determines how the port will route the data lines.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
mode – An enumerated representation of the routing behavior. Available modes are product specific. See the reference documentation.
-
void port_getVbusAccumulatedPower(unsigned int *id, struct Result *result, const int index)¶
Gets the Vbus Accumulated Power
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: The accumulated power on Vbus in milliwatt-hours.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setVbusAccumulatedPower(unsigned int *id, struct Result *result, const int index, const int milliwatthours)¶
Sets the Vbus Accumulated Power
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
milliwatthours – The accumulated power on Vbus in milliwatt-hours to be set.
-
void port_resetVbusAccumulatedPower(unsigned int *id, struct Result *result, const int index)¶
Resets the Vbus Accumulated Power to zero.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Deprecated:
Replace with setVbusAccumulatedPower(0)
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
-
void port_getVconnAccumulatedPower(unsigned int *id, struct Result *result, const int index)¶
Gets the Vconn Accumulated Power
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: The accumulated power on Vconn in milliwatt-hours.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setVconnAccumulatedPower(unsigned int *id, struct Result *result, const int index, const int milliwatthours)¶
Sets the Vconn Accumulated Power
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
milliwatthours – The accumulated power on Vconn to be set.
-
void port_resetVconnAccumulatedPower(unsigned int *id, struct Result *result, const int index)¶
Resets the Vconn Accumulated Power to zero.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Deprecated:
Replace with setVconnAccumulatedPower(0)
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
-
void port_setHSBoost(unsigned int *id, struct Result *result, const int index, const unsigned char boost)¶
Sets the ports USB 2.0 High Speed Boost Settings The setting determines how much additional drive the USB 2.0 signal will have in High Speed mode.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
boost – An enumerated representation of the boost range. Available value are product specific. See the reference documentation.
-
void port_getHSBoost(unsigned int *id, struct Result *result, const int index)¶
Gets the ports USB 2.0 High Speed Boost Settings The setting determines how much additional drive the USB 2.0 signal will have in High Speed mode.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: An enumerated representation of the boost range. Available modes are product specific. See the reference documentation.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_getCC1State(unsigned int *id, struct Result *result, const int index)¶
Gets the current CC1 Strapping on local and remote The state is a bit packed value where the upper byte is used to represent the remote or partner device attached to the ports resistance and the lower byte is used to represent the local or hubs resistance.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: Variable to be filled with an packed enumerated representation of the CC state. Enumeration values for each byte are as follows:
None = 0 = portCC1State_None
Invalid = 1 = portCC1State_Invalid
Rp (default) = 2 = portCC1State_RpDefault
Rp (1.5A) = 3 = portCC1State_Rp1p5
Rp (3A) = 4 = portCC1State_Rp3p0
Rd = 5 = portCC1State_Rd
Ra = 6 = portCC1State_Ra
Managed by controller = 7 = portCC1State_Managed
Unknown = 8 = portCC1State_Unknown
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_getCC2State(unsigned int *id, struct Result *result, const int index)¶
Gets the current CC2 Strapping on local and remote The state is a bit packed value where the upper byte is used to represent the remote or partner device attached to the ports resistance and the lower byte is used to represent the local or hubs resistance.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: Variable to be filled with an packed enumerated representation of the CC state. Enumeration values for each byte are as follows:
None = 0 = portCC2State_None
Invalid = 1 = portCC2State_Invalid
Rp (default) = 2 = portCC2State_RpDefault
Rp (1.5A) = 3 = portCC2State_Rp1p5
Rp (3A) = 4 = portCC2State_Rp3p0
Rd = 5 = portCC2State_Rd
Ra = 6 = portCC2State_Ra
Managed by controller = 7 = portCC2State_Managed
Unknown = 8 = portCC2State_Unknown
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_getSBU1Voltage(unsigned int *id, struct Result *result, const int index)¶
Get the voltage of SBU1 for a port.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: The USB channel voltage in micro-volts (1 == 1e-6V).
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_getSBU2Voltage(unsigned int *id, struct Result *result, const int index)¶
Get the voltage of SBU2 for a port.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: The USB channel voltage in micro-volts (1 == 1e-6V).
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_getCC1Voltage(unsigned int *id, struct Result *result, const int index)¶
Get the voltage of CC1 for a port.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: The USB channel voltage in micro-volts (1 == 1e-6V).
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_getCC2Voltage(unsigned int *id, struct Result *result, const int index)¶
Get the voltage of CC2 for a port.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: The USB channel voltage in micro-volts (1 == 1e-6V).
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_getCC1Current(unsigned int *id, struct Result *result, const int index)¶
Get the current through the CC1 for a port.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: The USB channel current in micro-amps (1 == 1e-6A).
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_getCC2Current(unsigned int *id, struct Result *result, const int index)¶
Get the current through the CC2 for a port.
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: The USB channel current in micro-amps (1 == 1e-6A).
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_getCC1AccumulatedPower(unsigned int *id, struct Result *result, const int index)¶
Sets the CC1 Accumulated Power
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: The accumulated power on Vconn in milliwatt-hours.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setCC1AccumulatedPower(unsigned int *id, struct Result *result, const int index, const int milliwatthours)¶
Gets the CC1 Accumulated Power
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
milliwatthours – The accumulated power on Vconn to be set.
-
void port_getCC2AccumulatedPower(unsigned int *id, struct Result *result, const int index)¶
Sets the CC2 Accumulated Power
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
value: The accumulated power on Vconn in milliwatt-hours.
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code and the requested value if successful.
index – The index of the entity in question.
-
void port_setCC2AccumulatedPower(unsigned int *id, struct Result *result, const int index, const int milliwatthours)¶
Gets the CC2 Accumulated Power
The result parameter will output the following fields:
error: Common EntityClass Return Values common entity return value
- Parameters:
id – ID assigned through “module_createStem”
result – Output object containing result code.
index – The index of the entity in question.
milliwatthours – The accumulated power on Vconn to be set.