TPS23861 Power over Ethernet
1.0.0
Software Application Programming Interface for Command and Control of the TI TPS23861 PSE Controller
|
Functions that configure and control the TPS23861 Power over Ethernet controller. More...
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) |
Functions that configure and control the TPS23861 Power over Ethernet controller.
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.
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.
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[in] | on_off_Port12 | Enables ports 1 & 2 to operate in 4-pair mode (TPS_ON) |
[in] | disconnectModePort12 | Disconnection 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_Port34 | Enables ports 3 & 4 to operate in 4-pair mode (TPS_ON) |
[in] | disconnectModePort34 | Disconnection 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] |
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.
[in] | systemPortNum | Port Number Value returned from the port registration function, tps_RegisterPort() |
[in] | operatingMode | Define the operating mode for the port [OPERATING_MODE_OFF, OPERATING_MODE_MANUAL, OPERATING_MODE_SEMI_AUTO, or OPERATING_MODE_AUTO] |
[in] | legacyDetect | The system can perform combinations of standard and legacy detections [LEGACY_DETECT_DISABLED, LEGACY_DETECT_ONLY, or LEGACY_DETECT_STANDARD_THEN_LEGACY] |
[in] | twoEvent | The 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] | class5Enable | Allows the system to attempt Class 5 current levels [TPS_ON or TPS_OFF] |
[in] | disconnectThreshold | Current threshold for disconnection [DCTH_7_5_MILLIAMP, DCTH_15_MILLIAMP, DCTH_30_MILLIAMP, or DCTH_50_MILLIAMP] |
[in] | icutCurrentThreshold | ICUT 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] | poepFoldbackCurve | Defines the foldback curve applied to a port when it is turned on [_1X_ILIM_FOLDBACK_CURVE or _2X_ILIM_FOLDBACK_CURVE] |
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
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[in] | ports | A TPS238x_Ports_t variable that identifies the ports that will be enabled for fast shutdown |
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
[in] | systemPortNum | Port Number Value returned from the port registration function, tps_RegisterPort() |
[in] | on_off | Enable (TPS_ON) or disable (TPS_OFF) the fast shutdown for the indicated port |
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.
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[in] | clearEvent | TPS_ON will cause the events to be cleared in the hardware, TPS_OFF will just read the current value of the events |
[out] | *powerEnablePortEvents | Address of a TPS238x_Ports_t variable that will receive the ports containing a power enable status change |
[out] | *powerGoodPortEvents | Address of a TPS238x_Ports_t variable that will receive the ports containing a power good status change |
[out] | *detectionPortEvents | Address of a TPS238x_Ports_t variable that will receive the ports that had a detection cycle |
[out] | *classificationPortEvents | Address of a TPS238x_Ports_t variable that will receive the ports that had a classification cycle |
[out] | *icutPortEvents | Address of a TPS238x_Ports_t variable that will receive the ports that had a ICUT fault |
[out] | *disconnectPortEvents | Address of a TPS238x_Ports_t variable that will receive the ports that had a disconnect event |
[out] | *inrushPortEvents | Address of a TPS238x_Ports_t variable that will receive the ports that had a inrush fault at port turn on |
[out] | *ilimPortEvents | Address of a TPS238x_Ports_t variable that will receive the ports that had a ILIM fault occurred |
[out] | *supplyEvents | Address 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 |
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.
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[out] | *classPorts | Address 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. |
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.
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[out] | *detectPorts | Address 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] | *classPorts | Address 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. |
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.
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[out] | *detectPorts | Address 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. |
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.
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[out] | *disconnectPorts | Address 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. |
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
[in] | systemPortNum | Port Number Value returned from the port registration function, tps_RegisterPort() |
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.
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[out] | *voltage | The 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 |
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).
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[out] | *intMask | Address 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] | *intDelayTime | Address of a uint8_t variable that will indicate the amount of defer time, with a 10ms lsb, of non-critical interrupts. |
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)
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[out] | *status | Address 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 |
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
[in] | systemPortNum | Port Number Value returned from the port registration function, tps_RegisterPort() |
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.
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[out] | *powerEnablePorts | Address of a TPS238x_Ports_t variable that will receive the power enable status with one bit for each port in power enabled state. |
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.
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[out] | *powerGoodPorts | Address of a TPS238x_Ports_t variable that will receive the power good status with one bit for each port in power good state. |
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.
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[out] | *powerEnablePorts | Address of a TPS238x_Ports_t variable that will receive the power enable status with one bit for each port in power enabled state. |
[out] | *powerGoodPorts | Address of a TPS238x_Ports_t variable that will receive the power good status with one bit for each port in power good state. |
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.
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[out] | *temperature | The 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 |
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.
[in] | systemPortNum | Port Number Value returned from the port registration function, tps_RegisterPort() |
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.
[in] | systemPortNum | Port Number Value returned from the port registration function, tps_RegisterPort() |
[out] | *classificationStatus | Address 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) |
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.
[in] | systemPortNum | Port Number Value returned from the port registration function, tps_RegisterPort() |
[out] | *detectionStatus | Address 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] | *classificationStatus | Address 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) |
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
[in] | systemPortNum | Port Number Value returned from the port registration function, tps_RegisterPort() |
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.
[in] | systemPortNum | Port Number Value returned from the port registration function, tps_RegisterPort() |
[out] | *detectionStatus | Address 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) |
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.
[in] | systemPortNum | Port Number Value returned from the port registration function, tps_RegisterPort() |
[out] | *detectResistance | The 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] | *detectResistanceStatus | The 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] |
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.
[in] | systemPortNum | Port Number Value returned from the port registration function, tps_RegisterPort() |
[out] | *detectVoltageDiff | The 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] | *detectVoltageDiffStatus | The 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] |
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.
[in] | systemPortNum | Port Number Value returned from the port registration function, tps_RegisterPort() |
[out] | *voltage | The 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] | *current | The 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. |
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.
[in] | systemPortNum | Port Number Value returned from the port registration function, tps_RegisterPort() |
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.
[in] | systemPortNum | Port Number Value returned from the port registration function, tps_RegisterPort() |
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.
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[in] | devicePortNum | TPS238X_PORT_1 - TPS238X_PORT_4, The port number ON THE SPECIFIC TPS23861 device |
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).
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[in] | devicePortNum | TPS238X_PORT_1 - TPS238X_PORT_4, The port number ON THE SPECIFIC TPS23861 device |
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().
[in] | systemPortNum | Port Number Value returned from the port registration function, 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.
[in] | systemPortNum | Port Number Value returned from the port registration function, tps_RegisterPort() |
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.
[in] | systemPortNum | Port Number Value returned from the port registration function, tps_RegisterPort() |
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.
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[in] | classPorts | A TPS238x_Ports_t variable that identifies the ports that will be restarted for classification with one bit for each port restarted. |
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.
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[in] | detectPorts | A TPS238x_Ports_t variable that identifies the ports that will be restarted for detection with one bit for each port restarted. |
[in] | classPorts | A TPS238x_Ports_t variable that identifies the ports that will be restarted for classification with one bit for each port restarted. |
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.
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[in] | detectPorts | A TPS238x_Ports_t variable that identifies the ports that will be restarted for detection with one bit for each port restarted. |
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.
[in] | systemPortNum | Port Number Value returned from the port registration function, tps_RegisterPort() |
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.
[in] | systemPortNum | Port Number Value returned from the port registration function, tps_RegisterPort() |
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.
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[in] | detectPorts | A 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] | classPorts | A TPS238x_Ports_t variable that identifies the ports that will be enabled for classification with one bit for each port in classification enabled state. |
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.
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[in] | disconnectPorts | A TPS238x_Ports_t variable that contains the ports that will be enabled for 2 pair disconnection with one bit for each port. |
[in] | disconnectThreshold1 | Disconnection threshold for port 1 [DCTH_7_5_MILLIAMP, DCTH_15_MILLIAMP, DCTH_30_MILLIAMP or DCTH_50_MILLIAMP] |
[in] | disconnectThreshold2 | Disconnection threshold for port 2 [DCTH_7_5_MILLIAMP, DCTH_15_MILLIAMP, DCTH_30_MILLIAMP or DCTH_50_MILLIAMP] |
[in] | disconnectThreshold3 | Disconnection threshold for port 3 [DCTH_7_5_MILLIAMP, DCTH_15_MILLIAMP, DCTH_30_MILLIAMP or DCTH_50_MILLIAMP] |
[in] | disconnectThreshold4 | Disconnection threshold for port 4 [DCTH_7_5_MILLIAMP, DCTH_15_MILLIAMP, DCTH_30_MILLIAMP or DCTH_50_MILLIAMP] |
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).
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[in] | intMask | TPS238X_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] | intDelayTime | Amount of time, with a 10ms lsb, to defer non-critical interrupts. Allows for "grouping" of events |
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.
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[in] | operatingMode1 | Define the operating mode for port 1 [OPERATING_MODE_OFF, OPERATING_MODE_MANUAL, OPERATING_MODE_SEMI_AUTO, or OPERATING_MODE_AUTO] |
[in] | operatingMode2 | Define the operating mode for port 2 [OPERATING_MODE_OFF, OPERATING_MODE_MANUAL, OPERATING_MODE_SEMI_AUTO, or OPERATING_MODE_AUTO] |
[in] | operatingMode3 | Define the operating mode for port 3 [OPERATING_MODE_OFF, OPERATING_MODE_MANUAL, OPERATING_MODE_SEMI_AUTO, or OPERATING_MODE_AUTO] |
[in] | operatingMode4 | Define the operating mode for port 4 [OPERATING_MODE_OFF, OPERATING_MODE_MANUAL, OPERATING_MODE_SEMI_AUTO, or OPERATING_MODE_AUTO] |
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.
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[in] | portsPoweredOff | A TPS238x_Ports_t variable that identifies the ports that will be powered off. |
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.
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[in] | portsPoweredOn | A TPS238x_Ports_t variable that identifies the ports that will be powered on. |
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.
[in] | device_i2c_address | 7 bit I2C address of the TPS238x part being controlled (do not included R/W bit) |
[in] | ilimTiming | The 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] | startTiming | The 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] | icutTiming | ICUT 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] | disconnectTiming | Disconnect 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] | coolDownFaultTiming | Amount of time before a port can turn back on after fault [COOL_DOWN_1_SEC, COOL_DOWN_2_SEC, or COOL_DOWN_4_SEC] |
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.
[in] | temp_i2cAddress | A temporary 7 bit I2C address that will be used during the address programming of the TPS238x parts (do not included R/W bit) |
[in] | numDevices | Number of TPS23861 devices on the I2C bus |
[in] | list_ofAddresses | A 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_ofAutoMode | A 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 |
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.
[in] | systemPortNum | Port Number Value returned from the port registration function, tps_RegisterPort() |
[in] | on_off_detect | TPS_ON to enable detection operations for the indicated port, TPS_OFF otherwise |
[in] | on_off_class | TPS_ON to enable classification operations for the indicated port, TPS_OFF otherwise |
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.
[in] | systemPortNum | Port Number Value returned from the port registration function, tps_RegisterPort() |
[in] | on_off | TPS_ON to enable disconnection operations for the indicated port, TPS_OFF otherwise |
[in] | disconnectThreshold | Disconnection threshold for indicated port [DCTH_7_5_MILLIAMP, DCTH_15_MILLIAMP, DCTH_30_MILLIAMP or DCTH_50_MILLIAMP] |
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.
[in] | systemPortNum | Port Number Value returned from the port registration function, tps_RegisterPort() |
[in] | operatingMode | Define the operating mode for the port [OPERATING_MODE_OFF, OPERATING_MODE_MANUAL, OPERATING_MODE_SEMI_AUTO, or OPERATING_MODE_AUTO] |
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.
[in] | systemPortNum | Port Number Value returned from the port registration function, tps_RegisterPort() |
[in] | on_off | Indicates whether to power on (TPS_ON) or power off (TPS_OFF) the specified port |