Port

See the Port Entity for generic information.

class brainstem.entity.Port(module, index)[source]

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.

getAllocatedPower()[source]

Gets the currently allocated power This value is determined by the power manager which is responsible for budgeting the systems available power envelope.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueint

Variable to be filled with the allocated power in milli-watts (mW).

Return type:

brainstem.result.Result

getAvailablePower()[source]

Gets the current available power. This value is determined by the power manager which is responsible for budgeting the systems available power envelope.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueunsigned int

Variable to be filled with the available power in milli-watts (mW).

Return type:

brainstem.result.Result

getCC1AccumulatedPower()[source]

Sets the CC1 Accumulated Power

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueint

The accumulated power on Vconn in milliwatt-hours.

Return type:

brainstem.result.Result

getCC1Current()[source]

Get the current through the CC1 for a port.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueint

The USB channel current in micro-amps (1 == 1e-6A).

Return type:

brainstem.result.Result

getCC1Enabled()[source]

Gets the current enable value of the CC1 lines. Sub-component of getCCEnabled.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valuebool

1 = CC1 enabled; 0 = CC1 disabled.

Return type:

brainstem.result.Result

getCC1State()[source]

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.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueunsigned short

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

Return type:

brainstem.result.Result

getCC1Voltage()[source]

Get the voltage of CC1 for a port.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueint

The USB channel voltage in micro-volts (1 == 1e-6V).

Return type:

brainstem.result.Result

getCC2AccumulatedPower()[source]

Sets the CC2 Accumulated Power

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueint

The accumulated power on Vconn in milliwatt-hours.

Return type:

brainstem.result.Result

getCC2Current()[source]

Get the current through the CC2 for a port.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueint

The USB channel current in micro-amps (1 == 1e-6A).

Return type:

brainstem.result.Result

getCC2Enabled()[source]

Gets the current enable value of the CC2 lines. Sub-component of getCCEnabled.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valuebool

1 = CC2 enabled; 0 = CC2 disabled.

Return type:

brainstem.result.Result

getCC2State()[source]

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.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueunsigned short

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

Return type:

brainstem.result.Result

getCC2Voltage()[source]

Get the voltage of CC2 for a port.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueint

The USB channel voltage in micro-volts (1 == 1e-6V).

Return type:

brainstem.result.Result

getCCCurrentLimit()[source]

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.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueunsigned char

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

Return type:

brainstem.result.Result

getCCEnabled()[source]

Gets the current enable value of the CC lines. Sub-component (CC) of getEnabled.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valuebool

1 = CC enabled; 0 = CC disabled.

Return type:

brainstem.result.Result

getCurrentLimit()[source]

Gets the current limit of the port.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueunsigned int

Variable to be filled with the limit in microAmps (uA).

Return type:

brainstem.result.Result

getCurrentLimitMode()[source]

Gets the current limit mode. The mode determines how the port will react to an over current condition.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueunsigned char

Variable to be filled with an enumerated representation of the current limit mode. Available modes are product specific. See the reference documentation.

Return type:

brainstem.result.Result

getDataEnabled()[source]

Gets the current enable value of the data lines. Sub-component (Data) of getEnabled.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valuebool

1 = Data enabled; 0 = Data disabled.

Return type:

brainstem.result.Result

getDataHS1Enabled()[source]

Gets the current enable value of the High Speed A side (HSA) data lines. Sub-component of getDataHSEnabled.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valuebool

1 = Data enabled; 0 = Data disabled.

Return type:

brainstem.result.Result

getDataHS2Enabled()[source]

Gets the current enable value of the High Speed B side (HSB) data lines. Sub-component of getDataHSEnabled.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valuebool

1 = Data enabled; 0 = Data disabled.

Return type:

brainstem.result.Result

getDataHSEnabled()[source]

Gets the current enable value of the High Speed (HS) data lines. Sub-component of getDataEnabled.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valuebool

1 = Data enabled; 0 = Data disabled.

Return type:

brainstem.result.Result

getDataHSRoutingBehavior()[source]

Gets the HighSpeed Data Routing Behavior. The mode determines how the port will route the data lines.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueunsigned char

Variable to be filled with an enumerated representation of the routing behavior. Available modes are product specific. See the reference documentation.

Return type:

brainstem.result.Result

getDataRole()[source]

Gets the Port Data Role.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueunsigned char

The data role to be set. See datasheet for details.

Return type:

brainstem.result.Result

getDataSS1Enabled()[source]

Gets the current enable value of the Super Speed A side (SSA) data lines. Sub-component of getDataSSEnabled.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valuebool

1 = Data enabled; 0 = Data disabled.

Return type:

brainstem.result.Result

getDataSS2Enabled()[source]

Gets the current enable value of the Super Speed B side (SSB) data lines. Sub-component of getDataSSEnabled.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valuebool

1 = Data enabled; 0 = Data disabled.

Return type:

brainstem.result.Result

getDataSSEnabled()[source]

Gets the current enable value of the Super Speed (SS) data lines. Sub-component of getDataEnabled.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valuebool

1 = Data enabled; 0 = Data disabled.

Return type:

brainstem.result.Result

getDataSSRoutingBehavior()[source]

Gets the SuperSpeed Data Routing Behavior. The mode determines how the port will route the data lines.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueunsigned char

Variable to be filled with an enumerated representation of the routing behavior. Available modes are product specific. See the reference documentation.

Return type:

brainstem.result.Result

getDataSpeed()[source]

Gets the speed of the enumerated device.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueunsigned char

Bit mapped value representing the devices speed. See “Devices” reference for details.

Return type:

brainstem.result.Result

getEnabled()[source]

Gets the current enable value of the port.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valuebool

1 = Fully enabled port; 0 = One or more disabled components.

Return type:

brainstem.result.Result

getErrors()[source]

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.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueunsigned int

Bit mapped field representing the current errors of the ports

Return type:

brainstem.result.Result

getHSBoost()[source]

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.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueunsigned char

An enumerated representation of the boost range. Available modes are product specific. See the reference documentation.

Return type:

brainstem.result.Result

getMode()[source]

Gets current mode of the port

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueunsigned int

Bit mapped value representing the ports mode. See “Devices” reference for details.

Return type:

brainstem.result.Result

getName(buffer_length=65536)[source]

Gets a user defined name of the port. Helpful for identifying ports/devices in a static environment.

Parameters:

buffer_length (unsigned int) – Length of the buffer to be filed

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valuestring

pointer to the start of a c style buffer to be filled

Return type:

brainstem.result.Result

getPowerEnabled()[source]

Gets the current enable value of the power lines. Sub-component (Power) of getEnabled.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valuebool

1 = Power enabled; 0 = Power disabled.

Return type:

brainstem.result.Result

getPowerLimit()[source]

Gets the user defined power limit for the port.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueunsigned int

Variable to be filled with the power limit in milli-watts (mW).

Return type:

brainstem.result.Result

getPowerLimitMode()[source]

Gets the power limit mode. The mode determines how the port will react to an over power condition.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueunsigned char

Variable to be filled with an enumerated representation of the power limit mode. Available modes are product specific. See the reference documentation.

Return type:

brainstem.result.Result

getPowerMode()[source]

Gets the Port Power Mode: Convenience Function of get/setPortMode

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueunsigned char

The current power mode.

Return type:

brainstem.result.Result

getSBU1Voltage()[source]

Get the voltage of SBU1 for a port.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueint

The USB channel voltage in micro-volts (1 == 1e-6V).

Return type:

brainstem.result.Result

getSBU2Voltage()[source]

Get the voltage of SBU2 for a port.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueint

The USB channel voltage in micro-volts (1 == 1e-6V).

Return type:

brainstem.result.Result

getState()[source]

A bit mapped representation of the current state of the port. Reflects what he port IS which may differ from what was requested.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueunsigned int

Variable to be filled with the current state.

Return type:

brainstem.result.Result

getVbusAccumulatedPower()[source]

Gets the Vbus Accumulated Power

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueint

The accumulated power on Vbus in milliwatt-hours.

Return type:

brainstem.result.Result

getVbusCurrent()[source]

Gets the Vbus Current

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueint

The current in microamps (1 == 1e-6A) currently present on Vbus.

Return type:

brainstem.result.Result

getVbusVoltage()[source]

Gets the Vbus Voltage

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueint

The voltage in microvolts (1 == 1e-6V) currently present on Vbus.

Return type:

brainstem.result.Result

getVconn1Enabled()[source]

Gets the current enable value of the Vconn1 lines. Sub-component of getVconnEnabled.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valuebool

1 = Vconn1 enabled; 0 = Vconn1 disabled.

Return type:

brainstem.result.Result

getVconn2Enabled()[source]

Gets the current enable value of the Vconn2 lines. Sub-component of getVconnEnabled.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valuebool

1 = Vconn2 enabled; 0 = Vconn2 disabled.

Return type:

brainstem.result.Result

getVconnAccumulatedPower()[source]

Gets the Vconn Accumulated Power

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueint

The accumulated power on Vconn in milliwatt-hours.

Return type:

brainstem.result.Result

getVconnCurrent()[source]

Gets the Vconn Current

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueint

The current in microamps (1 == 1e-6A) currently present on Vconn.

Return type:

brainstem.result.Result

getVconnEnabled()[source]

Gets the current enable value of the Vconn lines. Sub-component (Vconn) of getEnabled.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valuebool

1 = Vconn enabled; 0 = Vconn disabled.

Return type:

brainstem.result.Result

getVconnVoltage()[source]

Gets the Vconn Voltage

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueint

The voltage in microvolts (1 == 1e-6V) currently present on Vconn.

Return type:

brainstem.result.Result

getVoltageSetpoint()[source]

Gets the current voltage setpoint value for the port.

Returns:

Object containing error code and returned value on success.
errorunsigned byte

An error result from the list of defined error codes

valueunsigned int

the voltage setpoint of the port in uV.

Return type:

brainstem.result.Result

resetVbusAccumulatedPower()[source]

Resets the Vbus Accumulated Power to zero.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

resetVconnAccumulatedPower()[source]

Resets the Vconn Accumulated Power to zero.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setCC1AccumulatedPower(milliwatthours)[source]

Gets the CC1 Accumulated Power

Parameters:

milliwatthours (int) – The accumulated power on Vconn to be set.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setCC1Enabled(enable)[source]

Enables or disables the CC1 lines. Sub-component of setCCEnabled.

Parameters:

enable (bool) – 1 = Enable CC1 lines; 0 = Disable CC1 lines.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setCC2AccumulatedPower(milliwatthours)[source]

Gets the CC2 Accumulated Power

Parameters:

milliwatthours (int) – The accumulated power on Vconn to be set.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setCC2Enabled(enable)[source]

Enables or disables the CC2 lines. Sub-component of setCCEnabled.

Parameters:

enable (bool) – 1 = Enable CC2 lines; 0 = Disable CC2 lines.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setCCCurrentLimit(value)[source]

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.

Parameters:

value (unsigned char) –

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

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setCCEnabled(enable)[source]

Enables or disables the CC lines. Sub-component (CC) of setEnabled.

Parameters:

enable (bool) – 1 = Enable CC lines; 0 = Disable CC lines.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setCurrentLimit(limit)[source]

Sets the current limit of the port.

Parameters:

limit (unsigned int) – Current limit to be applied in microAmps (uA).

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setCurrentLimitMode(mode)[source]

Sets the current limit mode. The mode determines how the port will react to an over current condition.

Parameters:

mode (unsigned char) – An enumerated representation of the current limit mode. Available modes are product specific. See the reference documentation.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setDataEnabled(enable)[source]

Enables or disables the data lines. Sub-component (Data) of setEnabled.

Parameters:

enable (bool) – 1 = Enable data; 0 = Disable data.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setDataHS1Enabled(enable)[source]

Enables or disables the High Speed A side (HSA) data lines. Sub-component of setDataHSEnabled.

Parameters:

enable (bool) – 1 = Enable data; 0 = Disable data.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setDataHS2Enabled(enable)[source]

Enables or disables the High Speed B side (HSB) data lines. Sub-component of setDataHSEnabled.

Parameters:

enable (bool) – 1 = Enable data; 0 = Disable data.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setDataHSEnabled(enable)[source]

Enables or disables the High Speed (HS) data lines. Sub-component of setDataEnabled.

Parameters:

enable (bool) – 1 = Enable data; 0 = Disable data.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setDataHSRoutingBehavior(mode)[source]

Sets the HighSpeed Data Routing Behavior. The mode determines how the port will route the data lines.

Parameters:

mode (unsigned char) – An enumerated representation of the routing behavior. Available modes are product specific. See the reference documentation.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setDataSS1Enabled(enable)[source]

Enables or disables the Super Speed (SS) data lines. Sub-component of setDataEnabled.

Parameters:

enable (bool) – 1 = Enable data; 0 = Disable data.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setDataSS2Enabled(enable)[source]

Enables or disables the Super Speed B side (SSB) data lines. Sub-component of setDataSSEnabled.

Parameters:

enable (bool) – 1 = Enable data; 0 = Disable data.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setDataSSEnabled(enable)[source]

Enables or disables the Super Speed (SS) data lines. Sub-component of setDataEnabled.

Parameters:

enable (bool) – 1 = Enable data; 0 = Disable data.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setDataSSRoutingBehavior(mode)[source]

Sets the SuperSpeed Data Routing Behavior. The mode determines how the port will route the data lines.

Parameters:

mode (unsigned char) – An enumerated representation of the routing behavior. Available modes are product specific. See the reference documentation.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setEnabled(enable)[source]

Enables or disables the entire port.

Parameters:

enable (bool) – 1 = Fully enable port; 0 = Fully disable port.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setHSBoost(boost)[source]

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.

Parameters:

boost (unsigned char) – An enumerated representation of the boost range. Available value are product specific. See the reference documentation.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setMode(mode)[source]

Sets the mode of the port

Parameters:

mode (unsigned int) – Port mode to be set. See “Devices” documentation for details.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setName(buffer)[source]

Sets a user defined name of the port. Helpful for identifying ports/devices in a static environment.

Parameters:

buffer (string) – Pointer to the start of a c style buffer to be transferred.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setPowerEnabled(enable)[source]

Enables or Disables the power lines. Sub-component (Power) of setEnable.

Parameters:

enable (bool) – 1 = Enable power; 0 = Disable disable.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setPowerLimit(limit)[source]

Sets a user defined power limit for the port.

Parameters:

limit (unsigned int) – Power limit to be applied in milli-watts (mW).

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setPowerLimitMode(mode)[source]

Sets the power limit mode. The mode determines how the port will react to an over power condition.

Parameters:

mode (unsigned char) – An enumerated representation of the power limit mode to be applied Available modes are product specific. See the reference documentation.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setPowerMode(power_mode)[source]

Sets the Port Power Mode: Convenience Function of get/setPortMode

Parameters:

power_mode (unsigned char) – The power mode to be set.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setVbusAccumulatedPower(milliwatthours)[source]

Sets the Vbus Accumulated Power

Parameters:

milliwatthours (int) – The accumulated power on Vbus in milliwatt-hours to be set.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setVconn1Enabled(enable)[source]

Enables or disables the Vconn1 lines. Sub-component of setVconnEnabled.

Parameters:

enable (bool) – 1 = Enable Vconn1 lines; 0 = Disable Vconn1 lines.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setVconn2Enabled(enable)[source]

Enables or disables the Vconn2 lines. Sub-component of setVconnEnabled.

Parameters:

enable (bool) – 1 = Enable Vconn2 lines; 0 = Disable Vconn2 lines.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setVconnAccumulatedPower(milliwatthours)[source]

Sets the Vconn Accumulated Power

Parameters:

milliwatthours (int) – The accumulated power on Vconn to be set.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setVconnEnabled(enable)[source]

Enables or disables the Vconn lines. Sub-component (Vconn) of setEnabled.

Parameters:

enable (bool) – 1 = Enable Vconn lines; 0 = Disable Vconn lines.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte

setVoltageSetpoint(value)[source]

Sets the current voltage setpoint value for the port.

Parameters:

value (unsigned int) – the voltage setpoint of the port in uV.

Returns:

An error result from the list of defined error codes in brainstem.result.Result

Return type:

unsigned byte