TPS23861 Power over Ethernet  1.0.0
Software Application Programming Interface for Command and Control of the TI TPS23861 PSE Controller
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
C:/Users/a0207881/workspace_v5_3/PowerOverEthernet/TPS23861.c File Reference

Functions that configure and control the TPS23861 Power over Ethernet controller. More...

#include "msp430.h"
#include "common.h"
#include "TPS23861.h"
#include "I2C_Functions.h"

Functions

uint8_t tps_RegisterPort (uint16_t device_i2c_address, TPS238x_PortNum_t devicePortNum)
 Allocates a system level port number for a given TPS23861 device and it's specific port number. More...
 
uint16_t tps_GetDeviceI2CAddress (uint8_t systemPortNum)
 Get the TPS23861 I2C Address associated with a registered System Port Number. More...
 
TPS238x_PortNum_t tps_GetDevicePortNum (uint8_t systemPortNum)
 Get the TPS23861 I2C Address associated with a registered System Port Number. More...
 
uint8_t tps_GetSystemPortNumber (uint16_t device_i2c_address, TPS238x_PortNum_t devicePortNum)
 Returns the handle already allocated for the given TPS23861 and device port number. More...
 
uint8_t tps_SetI2CAddresses (uint8_t temp_i2cAddress, uint8_t numDevices, uint8_t *list_ofAddresses, TPS238x_On_Off_t *list_ofAutoMode)
 Allows a set of TPS23861 to be configured with unique I2C addresses. More...
 
uint8_t tps_SetDeviceInterruptMask (uint8_t device_i2c_address, TPS238X_Interrupt_Mask_Register_t intMask, uint8_t intDelayTime)
 Set the interrupt mask register. More...
 
uint8_t tps_GetDeviceInterruptMask (uint8_t device_i2c_address, TPS238X_Interrupt_Mask_Register_t *intMask, uint8_t *intDelayTime)
 Get the current setting of the interrupt mask register. More...
 
uint8_t tps_GetDeviceInterruptStatus (uint8_t device_i2c_address, TPS238X_Interrupt_Register_t *status)
 Get the current interrupt status for the indicated TPS23861 part. More...
 
uint8_t tps_GetDeviceAllInterruptEvents (uint8_t device_i2c_address, TPS238x_On_Off_t clearEvent, TPS238x_Ports_t *powerEnablePortEvents, TPS238x_Ports_t *powerGoodPortEvents, TPS238x_Ports_t *detectionPortEvents, TPS238x_Ports_t *classificationPortEvents, TPS238x_Ports_t *icutPortEvents, TPS238x_Ports_t *disconnectPortEvents, TPS238x_Ports_t *inrushPortEvents, TPS238x_Ports_t *ilimPortEvents, TPS238X_Supply_Event_Register_t *supplyEvents)
 Returns all of the individual event/fault registers that generated a TPS23861 interrupt. More...
 
uint8_t tps_GetPortDetectClassStatus (uint8_t systemPortNum, TPS238x_Detection_Status_t *detectionStatus, TPS238x_Classification_Status_t *classificationStatus)
 Returns the detection and classification status of the specified port. More...
 
uint8_t tps_GetPortDetectionStatus (uint8_t systemPortNum, TPS238x_Detection_Status_t *detectionStatus)
 Returns the detection status of the specified port. More...
 
uint8_t tps_GetPortClassificationStatus (uint8_t systemPortNum, TPS238x_Classification_Status_t *classificationStatus)
 Returns the classification status of the specified port. More...
 
uint8_t tps_GetDevicePowerStatus (uint8_t device_i2c_address, TPS238x_Ports_t *powerEnablePorts, TPS238x_Ports_t *powerGoodPorts)
 Returns the power enable and power good status of the 4 ports in the TPS23861. More...
 
uint8_t tps_GetDevicePowerEnableStatus (uint8_t device_i2c_address, TPS238x_Ports_t *powerEnablePorts)
 Returns the power enable status of the 4 ports in the TPS23861. More...
 
uint8_t tps_GetPortPowerEnableStatus (uint8_t systemPortNum)
 Returns the power enable status of one of the 4 ports in the TPS23861. More...
 
uint8_t tps_GetDevicePowerGoodStatus (uint8_t device_i2c_address, TPS238x_Ports_t *powerGoodPorts)
 Returns the power good status of the 4 ports in the TPS23861. More...
 
uint8_t tps_GetPortPowerGoodStatus (uint8_t systemPortNum)
 Returns the power good status of one of the 4 ports in the TPS23861. More...
 
uint8_t tps_SetDevicePowerOn (uint8_t device_i2c_address, TPS238x_Ports_t portsPoweredOn)
 Configures the power on state for each of the device ports on a specific TPS23861. More...
 
uint8_t tps_SetDevicePowerOff (uint8_t device_i2c_address, TPS238x_Ports_t portsPoweredOff)
 Configures the power down (off) state for each of the device ports on a specific TPS23861. More...
 
uint8_t tps_SetPortPower (uint8_t systemPortNum, TPS238x_On_Off_t on_off)
 Power on or off a single specified system port. More...
 
uint8_t tps_GetDeviceDetectionEnable (uint8_t device_i2c_address, TPS238x_Ports_t *detectPorts)
 Returns the device ports that are enabled for detection operation on the specific TPS23861. More...
 
uint8_t tps_GetPortDetectionEnable (uint8_t systemPortNum)
 Returns whether the indicated system port is enabled for detection operation. More...
 
uint8_t tps_GetDeviceClassificationEnable (uint8_t device_i2c_address, TPS238x_Ports_t *classPorts)
 Returns the device ports that are enabled for classification operation for a specific TPS23861 device. More...
 
uint8_t tps_GetPortClassificationEnable (uint8_t systemPortNum)
 Returns whether the indicated system port is enabled for classification operation. More...
 
uint8_t tps_GetDeviceDetectClassEnable (uint8_t device_i2c_address, TPS238x_Ports_t *detectPorts, TPS238x_Ports_t *classPorts)
 Returns the device ports that are enabled for detection and classification operation on the specified TPS23861. More...
 
uint8_t tps_SetDeviceDetectClassEnable (uint8_t device_i2c_address, TPS238x_Ports_t detectPorts, TPS238x_Ports_t classPorts)
 Configures the device ports that are enabled for detection and classification operation for a specified TPS23861. More...
 
uint8_t tps_SetPortDetectClassEnable (uint8_t systemPortNum, TPS238x_On_Off_t on_off_detect, TPS238x_On_Off_t on_off_class)
 Configures a single port to enable or disable the detection and classification operation. More...
 
uint8_t tps_GetDeviceDisconnectEnable (uint8_t device_i2c_address, TPS238x_Ports_t *disconnectPorts)
 Returns the ports that are enabled for 2 pair disconnection operation. More...
 
uint8_t tps_SetDeviceDisconnectEnable (uint8_t device_i2c_address, TPS238x_Ports_t disconnectPorts, TPS238x_Disconnect_Threshold_t disconnectThreshold1, TPS238x_Disconnect_Threshold_t disconnectThreshold2, TPS238x_Disconnect_Threshold_t disconnectThreshold3, TPS238x_Disconnect_Threshold_t disconnectThreshold4)
 Configures the ports to configure those that are enabled for 2 pair disconnection operation. More...
 
uint8_t tps_SetPortDisconnectEnable (uint8_t systemPortNum, TPS238x_On_Off_t on_off, TPS238x_Disconnect_Threshold_t disconnectThreshold)
 Configures a single port to enable or disable the 2 pair disconnection operation. More...
 
uint8_t tps_SetDeviceTiming (uint8_t device_i2c_address, TPS238x_ILIM_Timing_t ilimTiming, TPS238x_TStart_Timing_t startTiming, TPS238x_TICUT_Timing_t icutTiming, TPS238x_TDIS_Timing_t disconnectTiming, TPS238x_Cool_Down_Timing_t coolDownFaultTiming)
 Configures the timing of the various current limits and disconnection determinations for a given device in the system. More...
 
uint8_t tps_FastShutdownDeviceEnable (uint8_t device_i2c_address, TPS238x_Ports_t ports)
 Configures the fast shutdown enable for each of the ports on the TPS23861. More...
 
uint8_t tps_FastShutdownPortEnable (uint8_t systemPortNum, TPS238x_On_Off_t on_off)
 Configures the fast shutdown enable for a specific port on the TPS23861. More...
 
uint8_t tps_ConfigPort (uint8_t systemPortNum, TPS238x_Operating_Modes_t operatingMode, TPS238x_Legacy_Detect_t legacyDetect, TPS238x_Two_Event_t twoEvent, TPS238x_On_Off_t class5Enable, TPS238x_Disconnect_Threshold_t disconnectThreshold, TPS238x_ICUT_Config_t icutCurrentThreshold, TPS238x_POE_Plus_Foldback_t poepFoldbackCurve)
 Configures the current thresholds and operating modes for the specified port. More...
 
uint8_t tps_ConfigDevice4Pair (uint8_t device_i2c_address, TPS238x_On_Off_t on_off_Port12, TPS238x_Four_Pair_t disconnectModePort12, TPS238x_On_Off_t on_off_Port34, TPS238x_Four_Pair_t disconnectModePort34)
 Configures two ports to be used together as 4 pair operation. More...
 
uint8_t tps_SetPortOpMode (uint8_t systemPortNum, TPS238x_Operating_Modes_t operatingMode)
 Set the Operating Mode of a single port. More...
 
uint8_t tps_SetDeviceOpMode (uint8_t device_i2c_address, TPS238x_Operating_Modes_t operatingMode1, TPS238x_Operating_Modes_t operatingMode2, TPS238x_Operating_Modes_t operatingMode3, TPS238x_Operating_Modes_t operatingMode4)
 Set the Operating Mode for all of the ports on the TPS23861. More...
 
uint8_t tps_RestartDeviceDetection (uint8_t device_i2c_address, TPS238x_Ports_t detectPorts)
 Forces a restart of the detection process on the indicated ports on a given TPS23861 in the system. More...
 
uint8_t tps_RestartPortDetection (uint8_t systemPortNum)
 Forces a restart of the detection process on the indicated device ports for a given TPS23861. More...
 
uint8_t tps_RestartDeviceClassification (uint8_t device_i2c_address, TPS238x_Ports_t classPorts)
 Forces a restart of the classification process on the indicated ports. More...
 
uint8_t tps_RestartPortClassification (uint8_t systemPortNum)
 Forces a restart of the classification process on the single indicated port. More...
 
uint8_t tps_RestartDeviceDetectClass (uint8_t device_i2c_address, TPS238x_Ports_t detectPorts, TPS238x_Ports_t classPorts)
 Forces a restart both the classification and detection processes on the indicated ports. More...
 
uint8_t tps_ResetDevicePort (uint8_t systemPortNum)
 Forces a reset of the indicated device ports on the indicated TPS23861 device. More...
 
uint8_t tps_ResetPort (uint8_t systemPortNum)
 Forces a reset of the single specified system port number identifying a single port on a specific registered TPS23861. More...
 
uint8_t tps_GetPortMeasurements (uint8_t systemPortNum, uint16_t *voltage, uint16_t *current)
 Returns the voltage and current of the registered system port. More...
 
uint8_t tps_GetDeviceInputVoltage (uint8_t device_i2c_address, uint16_t *voltage)
 Returns the input voltage of the specified TPS23861. More...
 
uint8_t tps_GetDeviceTemperature (uint8_t device_i2c_address, uint8_t *temperature)
 Returns the temperature of the specified TPS23861. More...
 
uint8_t tps_GetPortDetectResistance (uint8_t systemPortNum, uint16_t *detectResistance, TPS238x_Detect_Resistance_Status_t *detectResistanceStatus)
 Returns the detection resistance value for the registered system port number on a specific TPS23861. More...
 
uint8_t tps_GetPortDetectVoltageDifference (uint8_t systemPortNum, uint16_t *detectVoltageDiff, TPS238x_Detect_Voltage_Difference_Status_t *detectVoltageDiffStatus)
 Returns the voltage difference for the indicated system port number on one of the TPS23861 in the system. More...
 
uint8_t tps_ReleasePort (uint8_t systemPortNum)
 Releases a register system port number from the port mapping table. More...
 
uint8_t tps_ResetInterruptPin (uint8_t device_i2c_address)
 

Detailed Description

Functions that configure and control the TPS23861 Power over Ethernet controller.

Date
January 2013

These software application programming interface functions will allow the user to configure and control the TPS23861 PoE controller.

These functions are written in C programming language. In order to support numerous processors and hardware systems, the hardware interfaces are all abstracted with functions located in the TPS238x_Glue.c file. The TPS2387 functions will reference a generic I2C read and write function, which the user will convert in the glue layer functions into a specific I2C function for the hardware and OS in use by the user solution.

Note
that the functions in this file are not re-entrant. It is the user's responsibility to assure that these functions are not called until the previous function has completed.

Function Documentation

uint8_t tps_ConfigDevice4Pair ( uint8_t  device_i2c_address,
TPS238x_On_Off_t  on_off_Port12,
TPS238x_Four_Pair_t  disconnectModePort12,
TPS238x_On_Off_t  on_off_Port34,
TPS238x_Four_Pair_t  disconnectModePort34 
)

Configures two ports to be used together as 4 pair operation.

The TPS23861 allows ports 1 & 2 or ports 3 & 4 to operate together to perform 4 pair PSE. There a a number of different disconnect modes that can be applied to a 4-pair port set. This function allows the user to enable the 4-pair port sets and define the disconnection mode to be used.

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[in]on_off_Port12Enables ports 1 & 2 to operate in 4-pair mode (TPS_ON)
[in]disconnectModePort12Disconnection mode for the 4-pair port set using ports 1 and 2 [FOUR_PAIR_DISCONNECT_DISABLED, FOUR_PAIR_DISCONNECT_BASED_ON_LOWER_PORT, FOUR_PAIR_DISCONNECT_BASED_ON_HIGHER_PORT, FOUR_PAIR_DISCONNECT_BASED_ON_EITHER_PORT, or FOUR_PAIR_DISCONNECT_BASED_ON_BOTH_PORTS]
[in]on_off_Port34Enables ports 3 & 4 to operate in 4-pair mode (TPS_ON)
[in]disconnectModePort34Disconnection mode for the 4-pair port set using ports 3 and 4 [FOUR_PAIR_DISCONNECT_DISABLED, FOUR_PAIR_DISCONNECT_BASED_ON_LOWER_PORT, FOUR_PAIR_DISCONNECT_BASED_ON_HIGHER_PORT, FOUR_PAIR_DISCONNECT_BASED_ON_EITHER_PORT, or FOUR_PAIR_DISCONNECT_BASED_ON_BOTH_PORTS]
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_ConfigPort ()
uint8_t tps_ConfigPort ( uint8_t  systemPortNum,
TPS238x_Operating_Modes_t  operatingMode,
TPS238x_Legacy_Detect_t  legacyDetect,
TPS238x_Two_Event_t  twoEvent,
TPS238x_On_Off_t  class5Enable,
TPS238x_Disconnect_Threshold_t  disconnectThreshold,
TPS238x_ICUT_Config_t  icutCurrentThreshold,
TPS238x_POE_Plus_Foldback_t  poepFoldbackCurve 
)

Configures the current thresholds and operating modes for the specified port.

The TPS23861 has a number of the threshold values and operating modes that determine the characteristic capabilities of a given port. This includes whether the port can detect class 5 devices or operate in legacy detection modes. This function allows the user to configure the characteristics for a given port.

Parameters
[in]systemPortNumPort Number Value returned from the port registration function, tps_RegisterPort()
[in]operatingModeDefine the operating mode for the port [OPERATING_MODE_OFF, OPERATING_MODE_MANUAL, OPERATING_MODE_SEMI_AUTO, or OPERATING_MODE_AUTO]
[in]legacyDetectThe system can perform combinations of standard and legacy detections [LEGACY_DETECT_DISABLED, LEGACY_DETECT_ONLY, or LEGACY_DETECT_STANDARD_THEN_LEGACY]
[in]twoEventThe system can attempt two event physical layer classifications when a class 4 or class 5 PD is found [TWO_EVENT_DISABLE, TWO_EVENT_AFTER_CLASS_4, TWO_EVENT_AFTER_CLASS_5, or TWO_EVENT_AFTER_CLASS_4_OR_5]
[in]class5EnableAllows the system to attempt Class 5 current levels [TPS_ON or TPS_OFF]
[in]disconnectThresholdCurrent threshold for disconnection [DCTH_7_5_MILLIAMP, DCTH_15_MILLIAMP, DCTH_30_MILLIAMP, or DCTH_50_MILLIAMP]
[in]icutCurrentThresholdICUT Current threshold [ICUT_110_MILLIAMP, ICUT_204_MILLIAMP, ICUT_374_MILLIAMP, ICUT_592_MILLIAMP, ICUT_686_MILLIAMP, ICUT_754_MILLIAMP, or ICUT_920_MILLIAMP]
[in]poepFoldbackCurveDefines the foldback curve applied to a port when it is turned on [_1X_ILIM_FOLDBACK_CURVE or _2X_ILIM_FOLDBACK_CURVE]
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_ConfigDevice4Pair ()
uint8_t tps_FastShutdownDeviceEnable ( uint8_t  device_i2c_address,
TPS238x_Ports_t  ports 
)

Configures the fast shutdown enable for each of the ports on the TPS23861.

This function will enable or disable the fast shutdown on each of the ports of the TPS23861

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[in]portsA TPS238x_Ports_t variable that identifies the ports that will be enabled for fast shutdown
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_FastShutdownPortEnable ()
uint8_t tps_FastShutdownPortEnable ( uint8_t  systemPortNum,
TPS238x_On_Off_t  on_off 
)

Configures the fast shutdown enable for a specific port on the TPS23861.

This function will enable or disable the fast shutdown on a specific port of the TPS23861

Parameters
[in]systemPortNumPort Number Value returned from the port registration function, tps_RegisterPort()
[in]on_offEnable (TPS_ON) or disable (TPS_OFF) the fast shutdown for the indicated port
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_FastShutdownDeviceEnable ()
uint8_t tps_GetDeviceAllInterruptEvents ( uint8_t  device_i2c_address,
TPS238x_On_Off_t  clearEvent,
TPS238x_Ports_t powerEnablePortEvents,
TPS238x_Ports_t powerGoodPortEvents,
TPS238x_Ports_t detectionPortEvents,
TPS238x_Ports_t classificationPortEvents,
TPS238x_Ports_t icutPortEvents,
TPS238x_Ports_t disconnectPortEvents,
TPS238x_Ports_t inrushPortEvents,
TPS238x_Ports_t ilimPortEvents,
TPS238X_Supply_Event_Register_t supplyEvents 
)

Returns all of the individual event/fault registers that generated a TPS23861 interrupt.

There are a number of events and faults that can generate an interrupt. This function returns the individual indicators for each of the interruptable event/fault conditions.

Calling this function will clear the interrupts associated with these events/faults, so the user should process all indicators present.

There are individual functions that return the event/fault status for an individual register.

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[in]clearEventTPS_ON will cause the events to be cleared in the hardware, TPS_OFF will just read the current value of the events
[out]*powerEnablePortEventsAddress of a TPS238x_Ports_t variable that will receive the ports containing a power enable status change
[out]*powerGoodPortEventsAddress of a TPS238x_Ports_t variable that will receive the ports containing a power good status change
[out]*detectionPortEventsAddress of a TPS238x_Ports_t variable that will receive the ports that had a detection cycle
[out]*classificationPortEventsAddress of a TPS238x_Ports_t variable that will receive the ports that had a classification cycle
[out]*icutPortEventsAddress of a TPS238x_Ports_t variable that will receive the ports that had a ICUT fault
[out]*disconnectPortEventsAddress of a TPS238x_Ports_t variable that will receive the ports that had a disconnect event
[out]*inrushPortEventsAddress of a TPS238x_Ports_t variable that will receive the ports that had a inrush fault at port turn on
[out]*ilimPortEventsAddress of a TPS238x_Ports_t variable that will receive the ports that had a ILIM fault occurred
[out]*supplyEventsAddress of a TPS238X_Supply_Event_Register_t variable that will receive the supply event faults VPUV_VPower_Undervoltage_Event VDUV_Vdd_UVLO_Event TSD_Thermal_Shutdown_Event
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
Note
Since the individual hardware registers contain more than one status in them, event status cannot be processed individually.
See Also
tps_SetDeviceInterruptMask ()
tps_GetDeviceInterruptMask ()
tps_GetDeviceInterruptStatus ()
tps_GetSystemPortNumber ()
uint8_t tps_GetDeviceClassificationEnable ( uint8_t  device_i2c_address,
TPS238x_Ports_t classPorts 
)

Returns the device ports that are enabled for classification operation for a specific TPS23861 device.

This function will return the ports that are configured for classification operations.

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[out]*classPortsAddress of a TPS238x_Ports_t variable that will receive the ports that are enabled for classification with one bit for each port in classification enabled state.
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_GetPortClassificationEnable ()
tps_GetDeviceDetectionEnable ()
tps_GetDeviceDetectClassEnable ()
tps_SetDeviceDetectClassEnable ()
tps_GetSystemPortNumber ()
uint8_t tps_GetDeviceDetectClassEnable ( uint8_t  device_i2c_address,
TPS238x_Ports_t detectPorts,
TPS238x_Ports_t classPorts 
)

Returns the device ports that are enabled for detection and classification operation on the specified TPS23861.

This function will return the device ports that are configured for detection and classification operations.

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[out]*detectPortsAddress of a TPS238x_Ports_t variable that will receive the ports that are enabled for detection with one bit for each port in detection enabled state.
[out]*classPortsAddress of a TPS238x_Ports_t variable that will receive the ports that are enabled for classification with one bit for each port in classification enabled state.
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_GetDeviceClassificationEnable ()
tps_GetDeviceDetectionEnable ()
tps_SetDeviceDetectClassEnable ()
tps_GetSystemPortNumber ()
uint8_t tps_GetDeviceDetectionEnable ( uint8_t  device_i2c_address,
TPS238x_Ports_t detectPorts 
)

Returns the device ports that are enabled for detection operation on the specific TPS23861.

This function will return the ports that are configured for detection operations.

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[out]*detectPortsAddress of a TPS238x_Ports_t variable that will receive the device ports that are enabled for detection with one bit for each port in detection enabled state.
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_GetPortDetectionEnable ()
tps_GetDeviceClassificationEnable ()
tps_GetDeviceDetectClassEnable ()
tps_SetDeviceDetectClassEnable ()
tps_GetSystemPortNumber ()
uint8_t tps_GetDeviceDisconnectEnable ( uint8_t  device_i2c_address,
TPS238x_Ports_t disconnectPorts 
)

Returns the ports that are enabled for 2 pair disconnection operation.

This function will return the ports that are configured for 2 pair disconnect operations. Disconnect operation consists of measuring the port current at the SENn pin, starting the TDIS timer when the current drops below the threshold, and turning the port off if the timer times out.

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[out]*disconnectPortsAddress of a TPS238x_Ports_t variable that will receive the ports that are enabled for 2 pair disconnection with one bit for each port in disconnect enabled state.
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_SetPortDisconnectEnable ()
tps_SetDeviceDisconnectEnable ()
tps_GetSystemPortNumber ()
uint16_t tps_GetDeviceI2CAddress ( uint8_t  systemPortNum)

Get the TPS23861 I2C Address associated with a registered System Port Number.

This function returns the I2C address for the TPS23861 device registered for a given System Port Number

Parameters
[in]systemPortNumPort Number Value returned from the port registration function, tps_RegisterPort()
Returns
uint16_t I2C Address number associated with this specific port.
TPS_PORT_NOT_REGISTERED_VALUE - Indicates no port associated.
See Also
tps_RegisterPort ()
tps_GetDevicePortNum ()
uint8_t tps_GetDeviceInputVoltage ( uint8_t  device_i2c_address,
uint16_t *  voltage 
)

Returns the input voltage of the specified TPS23861.

This function will return the input voltage of the specified TPS23861.

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[out]*voltageThe address of a uint16_t variable where the input voltage of the TPS23861. The voltage will be a scaled integer with an LSB of 3.662 mVolts
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_GetPortMeasurements ()
uint8_t tps_GetDeviceInterruptMask ( uint8_t  device_i2c_address,
TPS238X_Interrupt_Mask_Register_t intMask,
uint8_t *  intDelayTime 
)

Get the current setting of the interrupt mask register.

The function returns the TPS23861 events/faults that are able to generate interrupts (unmasked).

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[out]*intMaskAddress of a TPS238X_Interrupt_Mask_Register_t variable that will the current events that can generate interrupts PEMSK_Power_Enable_Unmask PGMSK_Power_Good_Unmask DIMSK_Disconnect_Unmask DEMSK_Detection_Cycle_Unmask CLMSK_Classificiation_Cycle_Unmask IFMSK_IFAULT_Unmask INMSK_Inrush_Fault_Unmask SUMSK_Supply_Event_Fault_Unmask
[out]*intDelayTimeAddress of a uint8_t variable that will indicate the amount of defer time, with a 10ms lsb, of non-critical interrupts.
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_SetDeviceInterruptMask ()
tps_GetDeviceInterruptStatus ()
tps_GetDeviceAllInterruptEvents ()
tps_GetSystemPortNumber ()
uint8_t tps_GetDeviceInterruptStatus ( uint8_t  device_i2c_address,
TPS238X_Interrupt_Register_t status 
)

Get the current interrupt status for the indicated TPS23861 part.

The function returns a variable that has a one bit indicator for each of the interrupts in the TPS23861.

The interrupt mask register identifies which events/faults will generate an interrupt. The status register will still indicate events/faults that are masked and would not generate an interrupt. If the user wants to only process unmasked interrupts, the results from this function must be combined with the interrupt mask (tps_GetInterruptMask)

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[out]*statusAddress of a TPS238X_Interrupt_Register_t variable that will receive the current interrupt status PEC_Power_Enable_Change PGC_Power_Good_Change DISF_Disconnect_Event DETC_Detection_Cycle CLASC_Classification_Cycle IFAULT_ICUT_ILIM_Fault INRF_Inrush_Fault SUPF_Supply_Event_Fault
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_GetDeviceAllInterruptEvents ()
tps_SetDeviceInterruptMask ()
tps_GetDeviceInterruptMask ()
tps_GetSystemPortNumber ()
TPS238x_PortNum_t tps_GetDevicePortNum ( uint8_t  systemPortNum)

Get the TPS23861 I2C Address associated with a registered System Port Number.

This function returns the I2C address for the TPS23861 device registered for a given System Port Number

Parameters
[in]systemPortNumPort Number Value returned from the port registration function, tps_RegisterPort()
Returns
uint16_t Device Port Number associated with this specific System Port Number.
TPS_PORT_NOT_REGISTERED_VALUE - Indicates no port associated.
See Also
tps_RegisterPort ()
tps_GetDeviceI2CAddress ()
uint8_t tps_GetDevicePowerEnableStatus ( uint8_t  device_i2c_address,
TPS238x_Ports_t powerEnablePorts 
)

Returns the power enable status of the 4 ports in the TPS23861.

This function will return the power good state of each port.

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[out]*powerEnablePortsAddress of a TPS238x_Ports_t variable that will receive the power enable status with one bit for each port in power enabled state.
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_GetPortPowerEnableStatus ()
tps_GetDevicePowerGoodStatus ()
tps_GetPortPowerGoodStatus ()
tps_GetDevicePowerStatus ()
tps_GetSystemPortNumber ()
uint8_t tps_GetDevicePowerGoodStatus ( uint8_t  device_i2c_address,
TPS238x_Ports_t powerGoodPorts 
)

Returns the power good status of the 4 ports in the TPS23861.

This function will return the power good state of each port.

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[out]*powerGoodPortsAddress of a TPS238x_Ports_t variable that will receive the power good status with one bit for each port in power good state.
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_GetPortPowerGoodStatus ()
tps_GetDevicePowerEnableStatus ()
tps_GetPortPowerEnableStatus ()
tps_GetDevicePowerStatus ()
tps_GetSystemPortNumber ()
uint8_t tps_GetDevicePowerStatus ( uint8_t  device_i2c_address,
TPS238x_Ports_t powerEnablePorts,
TPS238x_Ports_t powerGoodPorts 
)

Returns the power enable and power good status of the 4 ports in the TPS23861.

This function will return both the power enable and the power good state of each port.

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[out]*powerEnablePortsAddress of a TPS238x_Ports_t variable that will receive the power enable status with one bit for each port in power enabled state.
[out]*powerGoodPortsAddress of a TPS238x_Ports_t variable that will receive the power good status with one bit for each port in power good state.
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_GetDevicePowerEnableStatus ()
tps_GetPortPowerEnableStatus ()
tps_GetDevicePowerGoodStatus ()
tps_GetPortPowerGoodStatus ()
tps_GetSystemPortNumber ()
uint8_t tps_GetDeviceTemperature ( uint8_t  device_i2c_address,
uint8_t *  temperature 
)

Returns the temperature of the specified TPS23861.

This function will return the temperature of the specified TPS23861.

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[out]*temperatureThe address of a uint8_t variable where the temperature of the TPS23861. The temperature will be a scaled integer with an LSB of 0.652 degrees Celsius
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
uint8_t tps_GetPortClassificationEnable ( uint8_t  systemPortNum)

Returns whether the indicated system port is enabled for classification operation.

This function will return whether the indicated system port is configured for classification operations.

Parameters
[in]systemPortNumPort Number Value returned from the port registration function, tps_RegisterPort()
Returns
uint8_t TPS_ON - Port is enabled for classification TPS_OFF - Port is NOT enabled for classification
See Also
tps_GetDeviceClassificationEnable ()
tps_GetPortDetectionEnable ()
tps_SetPortDetectClassEnable ()
uint8_t tps_GetPortClassificationStatus ( uint8_t  systemPortNum,
TPS238x_Classification_Status_t classificationStatus 
)

Returns the classification status of the specified port.

This function will return the most recent classification result for the indicated port on the TPS23861.

The function will return a 0 (CLASS_UNKNOWN) when the port is turned off.

Parameters
[in]systemPortNumPort Number Value returned from the port registration function, tps_RegisterPort()
[out]*classificationStatusAddress of a TPS238x_Classification_Status_t variable that will receive the classification status for the indicated port (CLASS_UNKNOWN, CLASS_1, CLASS_2, CLASS_3, CLASS_4, CLASS_0, CLASS_OVERCURRENT, CLASS_MISMATCH, or CLASS_5)
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_GetPortDetectionStatus ()
tps_GetPortDetectClassStatus ()
uint8_t tps_GetPortDetectClassStatus ( uint8_t  systemPortNum,
TPS238x_Detection_Status_t detectionStatus,
TPS238x_Classification_Status_t classificationStatus 
)

Returns the detection and classification status of the specified port.

This function will return the most recent detection and classification result for the indicated port on the TPS23861.

The function will return a 0 (CLASS_UNKNOWN) when the port is turned off.

Parameters
[in]systemPortNumPort Number Value returned from the port registration function, tps_RegisterPort()
[out]*detectionStatusAddress of a TPS238x_Detection_Status_t variable that will receive the detecttion status for the indicated port (DETECT_UNKNOWN, DETECT_SHORT_CIRCUIT, DETECT_RESIST_LOW, DETECT_RESIST_VALID, DETECT_RESIST_HIGH, DETECT_OPEN_CIRCUIT, DETECT_MOSFET_FAULT, DETECT_LEGACY, DETECT_CAP_INVALID_CLAMP_VOLTAGE, DETECT_CAP_INVALID_DELTA_V, or DETECT_CAP_VALID_LEGACY_RANGE)
[out]*classificationStatusAddress of a TPS238x_Classification_Status_t variable that will receive the classification status for the indicated port (CLASS_UNKNOWN, CLASS_1, CLASS_2, CLASS_3, CLASS_4, CLASS_0, CLASS_OVERCURRENT, CLASS_MISMATCH, or CLASS_5)
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_GetPortDetectionStatus ()
tps_GetPortClassificationStatus ()
uint8_t tps_GetPortDetectionEnable ( uint8_t  systemPortNum)

Returns whether the indicated system port is enabled for detection operation.

This function will return a TPS_ON or TPS_OFF to indicate that the specific system port is enabled for detection or not

Parameters
[in]systemPortNumPort Number Value returned from the port registration function, tps_RegisterPort()
Returns
uint8_t TPS_ON - Port is enabled for detection TPS_OFF - Port is NOT enabled for detection
See Also
tps_GetDeviceDetectionEnable ()
tps_GetPortClassificationEnable ()
tps_SetPortDetectClassEnable ()
uint8_t tps_GetPortDetectionStatus ( uint8_t  systemPortNum,
TPS238x_Detection_Status_t detectionStatus 
)

Returns the detection status of the specified port.

This function will return the most recent detection result for the indicated port on the TPS23861.

The function will return a 0 (CLASS_UNKNOWN) when the port is turned off.

Parameters
[in]systemPortNumPort Number Value returned from the port registration function, tps_RegisterPort()
[out]*detectionStatusAddress of a TPS238x_Detection_Status_t variable that will receive the detecttion status for the indicated port (DETECT_UNKNOWN, DETECT_SHORT_CIRCUIT, DETECT_RESIST_LOW, DETECT_RESIST_VALID, DETECT_RESIST_HIGH, DETECT_OPEN_CIRCUIT, DETECT_MOSFET_FAULT, DETECT_LEGACY, DETECT_CAP_INVALID_CLAMP_VOLTAGE, DETECT_CAP_INVALID_DELTA_V, or DETECT_CAP_INVALID_LEGACY_RANGE)
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_GetPortClassificationStatus ()
tps_GetPortDetectClassStatus ()
uint8_t tps_GetPortDetectResistance ( uint8_t  systemPortNum,
uint16_t *  detectResistance,
TPS238x_Detect_Resistance_Status_t detectResistanceStatus 
)

Returns the detection resistance value for the registered system port number on a specific TPS23861.

This function will return the detection resistance and detection status for the registered system port on a TPS23861.

Parameters
[in]systemPortNumPort Number Value returned from the port registration function, tps_RegisterPort()
[out]*detectResistanceThe address of a uint16_t variable where the detection resistance of the port. The detection resistance will be a scaled integer with an LSB of 11.0966 ohms.
[out]*detectResistanceStatusThe address of a TPS238x_Detect_Resistance_Status_t variable for the most recent detection result status [RS_STATUS_GOOD, RS_STATUS_SHORT_CIRCUIT, RS_STATUS_OPEN_CIRCUIT, or RS_STATUS_MOSFET_SHORT_FAULT]
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_GetPortDetectVoltageDifference ()
uint8_t tps_GetPortDetectVoltageDifference ( uint8_t  systemPortNum,
uint16_t *  detectVoltageDiff,
TPS238x_Detect_Voltage_Difference_Status_t detectVoltageDiffStatus 
)

Returns the voltage difference for the indicated system port number on one of the TPS23861 in the system.

The system will attempt to determine a legacy PD by measuring the PD input capacitance on the PI. A fixed charge is injected into the PI and the resulting voltage difference is reported. The reported voltage difference is only usable when the status indicates a valid measurement.

Parameters
[in]systemPortNumPort Number Value returned from the port registration function, tps_RegisterPort()
[out]*detectVoltageDiffThe address of a uint16_t variable where the detection resistance of the port. The detection resistance will be a scaled integer with an LSB of 11.0966 ohms.
[out]*detectVoltageDiffStatusThe address of a TPS238x_Detect_Voltage_Difference_Status_t variable for the most recent detect voltage difference result status [VDS_STATUS_POWER_ON_RESET, VDS_STATUS_VALID_MEASUREMENT, VDS_STATUS_TIMEOUT, VDS_STATUS_FIRST_MEASUREMENT_EXCESS, VDS_STATUS_SECOND_MEASUREMENT_EXCESS, or VDS_STATUS_INSUFFICIENT_SIGNAL]
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_GetPortDetectResistance ()
uint8_t tps_GetPortMeasurements ( uint8_t  systemPortNum,
uint16_t *  voltage,
uint16_t *  current 
)

Returns the voltage and current of the registered system port.

This function will return the voltage and current on the registered port on a specific TPS23861.

Parameters
[in]systemPortNumPort Number Value returned from the port registration function, tps_RegisterPort()
[out]*voltageThe address of a uint16_t variable where the voltage of the indicated port will be placed. The voltage will be a scaled integer with an LSB of 3.662 mVolts
[out]*currentThe address of a uint16_t variable where the current of the indicated port will be placed. The current will be a scaled integer with an LSB that is dependent on the current-sense resistor. For a 250 mOhm resistor, the LSB will be 62.260 micro-Amps. For a 255 mOhm resistor, the LSB will be 61.039 micro-Amps.
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_GetDeviceInputVoltage ()
uint8_t tps_GetPortPowerEnableStatus ( uint8_t  systemPortNum)

Returns the power enable status of one of the 4 ports in the TPS23861.

This function will return the power enable state of the indicated port.

Parameters
[in]systemPortNumPort Number Value returned from the port registration function, tps_RegisterPort()
Returns
uint8_t TPS_ON if Power Enabled TPS_OFF is Power is NOT enabled, TPS_ERR_I2C_ERROR on I2C error status
See Also
tps_GetDevicePowerEnableStatus ()
tps_GetDevicePowerGoodStatus ()
tps_GetPortPowerGoodStatus ()
tps_GetDevicePowerStatus ()
tps_GetSystemPortNumber ()
uint8_t tps_GetPortPowerGoodStatus ( uint8_t  systemPortNum)

Returns the power good status of one of the 4 ports in the TPS23861.

This function will return the power good state of the indicated port.

Parameters
[in]systemPortNumPort Number Value returned from the port registration function, tps_RegisterPort()
Returns
uint8_t TPS_ON if Power Good TPS_OFF is Power is NOT good, TPS_ERR_I2C_ERROR on I2C error status
See Also
tps_GetDevicePowerGoodStatus ()
tps_GetDevicePowerEnableStatus ()
tps_GetPortPowerEnableStatus ()
tps_GetDevicePowerStatus ()
tps_GetSystemPortNumber ()
uint8_t tps_GetSystemPortNumber ( uint16_t  device_i2c_address,
TPS238x_PortNum_t  devicePortNum 
)

Returns the handle already allocated for the given TPS23861 and device port number.

This function can be used if the System Port Number returned in the tps_RegisterPort() function is lost or not maintained.

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[in]devicePortNumTPS238X_PORT_1 - TPS238X_PORT_4, The port number ON THE SPECIFIC TPS23861 device
Returns
uint8_t systemPortNum Unique handle that will be used to refer to this device and port number in future function calls.
TPS_PORT_NOT_REGISTERED_VALUE This combination of device and port number was not registered
See Also
tps_RegisterPort ()
uint8_t tps_RegisterPort ( uint16_t  device_i2c_address,
TPS238x_PortNum_t  devicePortNum 
)

Allocates a system level port number for a given TPS23861 device and it's specific port number.

It is easier for users to maintain a system with 4 TPS23861 with 4 ports each, when each port has a unique number. By registering each of the 16 individual ports (in this example), the user can work with ports 0-15, rather than have to maintain device 1 - port 0, through device 4 - port 3.

This function must be called prior to any function call that has a systemPortNum as an input. The current logic has room for TPS_MAX_SYSTEM_PORTS (64) ports. The TPS_PortMap[] variable can be modified to support more ports (or save some memory by supporting fewer).

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[in]devicePortNumTPS238X_PORT_1 - TPS238X_PORT_4, The port number ON THE SPECIFIC TPS23861 device
Returns
uint8_t systemPortNum Unique handle that will be used to refer to this device and port number in future function calls.
TPS_ERR_NO_PORT_AVAILABLE No port number available, all are in use
See Also
tps_ReleasePort ()
uint8_t tps_ReleasePort ( uint8_t  systemPortNum)

Releases a register system port number from the port mapping table.

This function would undo the registration performed in tps_RegisterPort().

Parameters
[in]systemPortNumPort Number Value returned from the port registration function, tps_RegisterPort()
Returns
uint8_t TPS_SUCCESSFUL or TPS_ERR_PORT_NOT_IN_USE
See Also
tps_RegisterPort ()
uint8_t tps_ResetDevicePort ( uint8_t  systemPortNum)

Forces a reset of the indicated device ports on the indicated TPS23861 device.

This function will reset the indicated device ports on the identified TPS23861.

Parameters
[in]systemPortNumPort Number Value returned from the port registration function, tps_RegisterPort()
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_ResetPort ()
uint8_t tps_ResetInterruptPin ( uint8_t  device_i2c_address)
uint8_t tps_ResetPort ( uint8_t  systemPortNum)

Forces a reset of the single specified system port number identifying a single port on a specific registered TPS23861.

This function will reset the single specified port registered with the system for a given TPS23861.

Parameters
[in]systemPortNumPort Number Value returned from the port registration function, tps_RegisterPort()
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_ResetDevicePort ()
uint8_t tps_RestartDeviceClassification ( uint8_t  device_i2c_address,
TPS238x_Ports_t  classPorts 
)

Forces a restart of the classification process on the indicated ports.

This function will restart the classification process on the indicated ports on the TPS23861.

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[in]classPortsA TPS238x_Ports_t variable that identifies the ports that will be restarted for classification with one bit for each port restarted.
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_RestartPortClassification ()
tps_RestartDeviceDetection ()
tps_RestartDeviceDetectClass ()
uint8_t tps_RestartDeviceDetectClass ( uint8_t  device_i2c_address,
TPS238x_Ports_t  detectPorts,
TPS238x_Ports_t  classPorts 
)

Forces a restart both the classification and detection processes on the indicated ports.

This function will restart both the classification and detection process on the indicated ports on the TPS23861.

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[in]detectPortsA TPS238x_Ports_t variable that identifies the ports that will be restarted for detection with one bit for each port restarted.
[in]classPortsA TPS238x_Ports_t variable that identifies the ports that will be restarted for classification with one bit for each port restarted.
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_RestartDeviceClassification ()
tps_RestartDeviceDetection ()
uint8_t tps_RestartDeviceDetection ( uint8_t  device_i2c_address,
TPS238x_Ports_t  detectPorts 
)

Forces a restart of the detection process on the indicated ports on a given TPS23861 in the system.

This function will restart the detection process on the indicated ports on the specified TPS23861.

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[in]detectPortsA TPS238x_Ports_t variable that identifies the ports that will be restarted for detection with one bit for each port restarted.
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_RestartPortDetection ()
tps_RestartDeviceClassification ()
tps_RestartDeviceDetectClass ()
tps_GetSystemPortNumber ()
uint8_t tps_RestartPortClassification ( uint8_t  systemPortNum)

Forces a restart of the classification process on the single indicated port.

This function will restart the classification process on the specified port on the TPS23861.

Parameters
[in]systemPortNumPort Number Value returned from the port registration function, tps_RegisterPort()
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_RestartDeviceClassification ()
tps_RestartPortDetection ()
uint8_t tps_RestartPortDetection ( uint8_t  systemPortNum)

Forces a restart of the detection process on the indicated device ports for a given TPS23861.

This function will restart the detection process on the indicated device ports on the given TPS23861.

Parameters
[in]systemPortNumPort Number Value returned from the port registration function, tps_RegisterPort()
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_RestartPortClassification ()
tps_RestartDeviceDetection ()
tps_RestartDeviceDetection ()
uint8_t tps_SetDeviceDetectClassEnable ( uint8_t  device_i2c_address,
TPS238x_Ports_t  detectPorts,
TPS238x_Ports_t  classPorts 
)

Configures the device ports that are enabled for detection and classification operation for a specified TPS23861.

This function will set the detection and classification operations for all of the ports on a specific TPS23861.

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[in]detectPortsA TPS238x_Ports_t variable that identifies the ports that will be enabled for detection with one bit for each port in detection enabled state.
[in]classPortsA TPS238x_Ports_t variable that identifies the ports that will be enabled for classification with one bit for each port in classification enabled state.
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_SetPortDetectClassEnable ()
tps_GetDeviceClassificationEnable ()
tps_GetDeviceDetectionEnable ()
tps_GetDeviceDetectClassEnable ()
uint8_t tps_SetDeviceDisconnectEnable ( uint8_t  device_i2c_address,
TPS238x_Ports_t  disconnectPorts,
TPS238x_Disconnect_Threshold_t  disconnectThreshold1,
TPS238x_Disconnect_Threshold_t  disconnectThreshold2,
TPS238x_Disconnect_Threshold_t  disconnectThreshold3,
TPS238x_Disconnect_Threshold_t  disconnectThreshold4 
)

Configures the ports to configure those that are enabled for 2 pair disconnection operation.

This function will configure all four ports to identify which ones support disconnection operations. If the user wishes to configure a single port, the tps_SetPortDisconnectEnable() is used.

Disconnect operation consists of measuring the port current at the SENn pin, starting the TDIS timer when the current drops below the threshold, and turning the port off if the timer times out.

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[in]disconnectPortsA TPS238x_Ports_t variable that contains the ports that will be enabled for 2 pair disconnection with one bit for each port.
[in]disconnectThreshold1Disconnection threshold for port 1 [DCTH_7_5_MILLIAMP, DCTH_15_MILLIAMP, DCTH_30_MILLIAMP or DCTH_50_MILLIAMP]
[in]disconnectThreshold2Disconnection threshold for port 2 [DCTH_7_5_MILLIAMP, DCTH_15_MILLIAMP, DCTH_30_MILLIAMP or DCTH_50_MILLIAMP]
[in]disconnectThreshold3Disconnection threshold for port 3 [DCTH_7_5_MILLIAMP, DCTH_15_MILLIAMP, DCTH_30_MILLIAMP or DCTH_50_MILLIAMP]
[in]disconnectThreshold4Disconnection threshold for port 4 [DCTH_7_5_MILLIAMP, DCTH_15_MILLIAMP, DCTH_30_MILLIAMP or DCTH_50_MILLIAMP]
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_SetPortDisconnectEnable ()
tps_GetDeviceDisconnectEnable ()
uint8_t tps_SetDeviceInterruptMask ( uint8_t  device_i2c_address,
TPS238X_Interrupt_Mask_Register_t  intMask,
uint8_t  intDelayTime 
)

Set the interrupt mask register.

The function sets which TPS23861 events/faults are allowed to generate interrupts (unmasked).

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[in]intMaskTPS238X_Interrupt_Mask_Register_t variable that contains the conditions that are allowed to generate interrupts PEMSK_Power_Enable_Unmask PGMSK_Power_Good_Unmask DIMSK_Disconnect_Unmask DEMSK_Detection_Cycle_Unmask CLMSK_Classificiation_Cycle_Unmask IFMSK_IFAULT_Unmask INMSK_Inrush_Fault_Unmask SUMSK_Supply_Event_Fault_Unmask
[in]intDelayTimeAmount of time, with a 10ms lsb, to defer non-critical interrupts. Allows for "grouping" of events
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_GetDeviceInterruptMask ()
tps_GetDeviceInterruptStatus ()
tps_GetDeviceAllInterruptEvents ()
uint8_t tps_SetDeviceOpMode ( uint8_t  device_i2c_address,
TPS238x_Operating_Modes_t  operatingMode1,
TPS238x_Operating_Modes_t  operatingMode2,
TPS238x_Operating_Modes_t  operatingMode3,
TPS238x_Operating_Modes_t  operatingMode4 
)

Set the Operating Mode for all of the ports on the TPS23861.

The TPS23861 has a number of operating modes that determine the characteristic capabilities of a given port. This function allows the user to configure the operating for all of the ports.

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[in]operatingMode1Define the operating mode for port 1 [OPERATING_MODE_OFF, OPERATING_MODE_MANUAL, OPERATING_MODE_SEMI_AUTO, or OPERATING_MODE_AUTO]
[in]operatingMode2Define the operating mode for port 2 [OPERATING_MODE_OFF, OPERATING_MODE_MANUAL, OPERATING_MODE_SEMI_AUTO, or OPERATING_MODE_AUTO]
[in]operatingMode3Define the operating mode for port 3 [OPERATING_MODE_OFF, OPERATING_MODE_MANUAL, OPERATING_MODE_SEMI_AUTO, or OPERATING_MODE_AUTO]
[in]operatingMode4Define the operating mode for port 4 [OPERATING_MODE_OFF, OPERATING_MODE_MANUAL, OPERATING_MODE_SEMI_AUTO, or OPERATING_MODE_AUTO]
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_SetPortOpMode ()
tps_ConfigPort ()
uint8_t tps_SetDevicePowerOff ( uint8_t  device_i2c_address,
TPS238x_Ports_t  portsPoweredOff 
)

Configures the power down (off) state for each of the device ports on a specific TPS23861.

This function will power down (off) multiple ports at the same time. Each of the ports indicated in the TPS23861 will be powered off.

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[in]portsPoweredOffA TPS238x_Ports_t variable that identifies the ports that will be powered off.
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_SetDevicePowerOn ()
tps_SetPortPower ()
tps_GetSystemPortNumber ()
uint8_t tps_SetDevicePowerOn ( uint8_t  device_i2c_address,
TPS238x_Ports_t  portsPoweredOn 
)

Configures the power on state for each of the device ports on a specific TPS23861.

This function will power on multiple ports at the same time. Each of the ports indicated in the TPS23861 will be powered on.

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[in]portsPoweredOnA TPS238x_Ports_t variable that identifies the ports that will be powered on.
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_SetDevicePowerOff ()
tps_SetPortPower ()
tps_GetSystemPortNumber ()
uint8_t tps_SetDeviceTiming ( uint8_t  device_i2c_address,
TPS238x_ILIM_Timing_t  ilimTiming,
TPS238x_TStart_Timing_t  startTiming,
TPS238x_TICUT_Timing_t  icutTiming,
TPS238x_TDIS_Timing_t  disconnectTiming,
TPS238x_Cool_Down_Timing_t  coolDownFaultTiming 
)

Configures the timing of the various current limits and disconnection determinations for a given device in the system.

The TPS23861 has three levels of overcurrent protections, disconnection detection, and time out after fault conditions. In order to prevent glitches or transients from causing unnecessary shutdowns or faults, the system uses various timers to define the amount of time required over the threshold level before a fault or shutdown is declared.

This function sets up the various timing parameters used in the system. These timings are applicable on all active ports.

Parameters
[in]device_i2c_address7 bit I2C address of the TPS238x part being controlled (do not included R/W bit)
[in]ilimTimingThe ILIM Fault Timing which is the foldback current time limit before port turn off [TLIM_60_MS, TLIM_30_MS, TLIM_15_MS, or TLIM_10_MS]
[in]startTimingThe length of the TSTART period, which is the maximum amount of allowed overcurrent time during inrush [TSTART_30_MS, TSTART_60_MS, or TSTART_120_MS]
[in]icutTimingICUT Fault timing, which is the overcurrent time duration before port turn off [TICUT_30_MS, TICUT_60_MS, TICUT_120_MS, or TICUT_240_MS]
[in]disconnectTimingDisconnect delay, which is the time to turn off a port once there is a disconnect condition [TDIS_90_MS, TDIS_180_MS, TDIS_360_MS, or TDIS_720_MS]
[in]coolDownFaultTimingAmount of time before a port can turn back on after fault [COOL_DOWN_1_SEC, COOL_DOWN_2_SEC, or COOL_DOWN_4_SEC]
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_ConfigPort ()
tps_ConfigDevice4Pair ()
uint8_t tps_SetI2CAddresses ( uint8_t  temp_i2cAddress,
uint8_t  numDevices,
uint8_t *  list_ofAddresses,
TPS238x_On_Off_t list_ofAutoMode 
)

Allows a set of TPS23861 to be configured with unique I2C addresses.

The system is designed so a number of TPS23861 can be placed on the same I2C bus. For this to work, each device must have a unique I2C address to allow them to be individually commanded. This function will program a set of TPS23861 devices on the same I2C bus with different addresses. The new I2C address will be stored in non-volatile memory and become the new I2C address for the specific part, even after power off.

Parameters
[in]temp_i2cAddressA temporary 7 bit I2C address that will be used during the address programming of the TPS238x parts (do not included R/W bit)
[in]numDevicesNumber of TPS23861 devices on the I2C bus
[in]list_ofAddressesA pointer to a list of uint8_t 7 bit I2C addresses for each of the TPS23861 parts on the I2C bus (do not included R/W bit)
[in]list_ofAutoModeA pointer to a list of TPS_On_Off_t values that contain TPS_ON for the devices that operate in AUTO mode and TPS_OFF for those that do not operate in AUTO mode
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
uint8_t tps_SetPortDetectClassEnable ( uint8_t  systemPortNum,
TPS238x_On_Off_t  on_off_detect,
TPS238x_On_Off_t  on_off_class 
)

Configures a single port to enable or disable the detection and classification operation.

This function will set the detection and classification operations for the selected port of the TPS23861.

Parameters
[in]systemPortNumPort Number Value returned from the port registration function, tps_RegisterPort()
[in]on_off_detectTPS_ON to enable detection operations for the indicated port, TPS_OFF otherwise
[in]on_off_classTPS_ON to enable classification operations for the indicated port, TPS_OFF otherwise
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_SetDeviceDetectClassEnable ()
tps_SetPortDetectClassEnable ()
tps_GetPortClassificationEnable ()
tps_GetPortDetectionEnable ()
uint8_t tps_SetPortDisconnectEnable ( uint8_t  systemPortNum,
TPS238x_On_Off_t  on_off,
TPS238x_Disconnect_Threshold_t  disconnectThreshold 
)

Configures a single port to enable or disable the 2 pair disconnection operation.

This function will configure one of the four ports to enable or disable disconnection operations. If the user wishes to configure a all ports at once, the tps_SetDisconnectEnable() is used.

Disconnect operation consists of measuring the port current at the SENn pin, starting the TDIS timer when the current drops below the threshold, and turning the port off if the timer times out.

Parameters
[in]systemPortNumPort Number Value returned from the port registration function, tps_RegisterPort()
[in]on_offTPS_ON to enable disconnection operations for the indicated port, TPS_OFF otherwise
[in]disconnectThresholdDisconnection threshold for indicated port [DCTH_7_5_MILLIAMP, DCTH_15_MILLIAMP, DCTH_30_MILLIAMP or DCTH_50_MILLIAMP]
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_SetDeviceDisconnectEnable ()
tps_GetDeviceDisconnectEnable ()
uint8_t tps_SetPortOpMode ( uint8_t  systemPortNum,
TPS238x_Operating_Modes_t  operatingMode 
)

Set the Operating Mode of a single port.

The TPS23861 has a number of operating modes that determine the characteristic capabilities of a given port. This function allows the user to configure the operating for a given port.

Parameters
[in]systemPortNumPort Number Value returned from the port registration function, tps_RegisterPort()
[in]operatingModeDefine the operating mode for the port [OPERATING_MODE_OFF, OPERATING_MODE_MANUAL, OPERATING_MODE_SEMI_AUTO, or OPERATING_MODE_AUTO]
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_SetDeviceOpMode ()
tps_ConfigPort ()
uint8_t tps_SetPortPower ( uint8_t  systemPortNum,
TPS238x_On_Off_t  on_off 
)

Power on or off a single specified system port.

This function will either power on or power down (off) a single port on one of the registered TPS23861 ports in the system.

Parameters
[in]systemPortNumPort Number Value returned from the port registration function, tps_RegisterPort()
[in]on_offIndicates whether to power on (TPS_ON) or power off (TPS_OFF) the specified port
Returns
uint8_t (I2C_SUCCESSFUL or I2C error status)
See Also
tps_SetDevicePowerOn ()
tps_SetDevicePowerOff ()