Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: HelloWorld_IPS02A1
Fork of X_NUCLEO_IPS02A1 by
VPS2535H Class Reference
Class representing a VPS2535H power switch component. More...
#include <VPS2535H.h>
Inherits PowerSwitch.
Public Member Functions | |
| VPS2535H (PinName in1, PinName in2, PinName frStdby, PinName sense1, PinName sense2, float vref, float rsense, float rd1, float rd2) | |
| Constructor. | |
| virtual | ~VPS2535H () |
| Destructor. | |
| virtual int | init (void *init_struct) |
| Set VPS2535H Initialization. | |
| virtual int | close (void) |
| Close VPS2535H. | |
| virtual int | read_id (uint8_t *id) |
| Getting the ID of the component. | |
| virtual float | get_current (int Ch) |
| GetCurrent function gets the I-sense switch output pin. | |
| IPS_StatusTypeDef | VPS2535H_get_secure_current_sense (IPS_HandleTypeDef *hips) |
| GetSecureCurrentSense function gets the I-sense switch output pin upon ADC conversion. | |
Protected Member Functions | |
| IPS_StatusTypeDef | VPS2535H_close (void) |
| Close (Deinitialize) the VPS2535H device and used peripheral. | |
| IPS_StatusTypeDef | VPS2535H_init (void) |
| Initializes the VPS2535H device. | |
| IPS_StatusTypeDef | VPS2535H_get_sense_channel_diagnostic (IPS_HandleTypeDef *) |
| GetSense function gets the value of the Sense power switch output pin (for either Ch1 or Ch2) upon IO conversion. | |
Detailed Description
Class representing a VPS2535H power switch component.
Definition at line 62 of file VPS2535H.h.
Constructor & Destructor Documentation
| VPS2535H | ( | PinName | in1, |
| PinName | in2, | ||
| PinName | frStdby, | ||
| PinName | sense1, | ||
| PinName | sense2, | ||
| float | vref, | ||
| float | rsense, | ||
| float | rd1, | ||
| float | rd2 | ||
| ) |
Constructor.
- Parameters:
-
[in] input Pin for the power switch [out] sense1 and sense2, outputs from Ch1 and Ch2 [in] vref,reference voltage [in] rsense,sense resistor ouside of chip [in] rd1,upper partitor resistor (=R6 in schematic) to protect ADC [in] rd1,lower partitor resistor (=R7 in schematic) to protect ADC
Definition at line 75 of file VPS2535H.h.
| virtual ~VPS2535H | ( | ) | [virtual] |
Destructor.
Definition at line 93 of file VPS2535H.h.
Member Function Documentation
| int close | ( | void | ) | [virtual] |
Close VPS2535H.
- Parameters:
-
none
- Return values:
-
IPS_SUCCESS
Definition at line 60 of file VPS2535H.cpp.
| float get_current | ( | int | Ch ) | [virtual] |
GetCurrent function gets the I-sense switch output pin.
- Parameters:
-
Ch,: Channel number. Possible value are CHANNEL_1 or CHANNEL_2
- Return values:
-
Current Value
Implements PowerSwitch.
Definition at line 144 of file VPS2535H.cpp.
| int init | ( | void * | init_struct ) | [virtual] |
Set VPS2535H Initialization.
- Parameters:
-
VPS2535H handel structure
- Return values:
-
IPS_SUCCESS
Implements Component.
Definition at line 50 of file VPS2535H.cpp.
| virtual int read_id | ( | uint8_t * | id ) | [virtual] |
Getting the ID of the component.
- Parameters:
-
[out] id pointer to an allocated variable to store the ID into.
- Return values:
-
0 in case of success, an error code otherwise.
Implements Component.
Definition at line 100 of file VPS2535H.h.
| IPS_StatusTypeDef VPS2535H_close | ( | void | ) | [protected] |
Close (Deinitialize) the VPS2535H device and used peripheral.
- Parameters:
-
None
- Return values:
-
VPS2535H status
Definition at line 81 of file VPS2535H.cpp.
| IPS_StatusTypeDef VPS2535H_get_secure_current_sense | ( | IPS_HandleTypeDef * | hips ) |
GetSecureCurrentSense function gets the I-sense switch output pin upon ADC conversion.
- Parameters:
-
hips,: pointer to a IPS_HandleTypeDef structure that contains the configuration information for the specified VPS2535H module. Value got from V-sense output is stored in hips->SenseValue field. Status of the operation is stored in hips->Status fields
- Return values:
-
IPS status
Definition at line 123 of file VPS2535H.cpp.
| IPS_StatusTypeDef VPS2535H_get_sense_channel_diagnostic | ( | IPS_HandleTypeDef * | hips ) | [protected] |
GetSense function gets the value of the Sense power switch output pin (for either Ch1 or Ch2) upon IO conversion.
It just reads from sense pin
- Parameters:
-
hips,: pointer to a VPS2535H_HandleTypeDef structure that contains the configuration information for the specified VPS2535H module. Value got from V-sense output is stored in hips->SenseValue field. Status of the operation is stored in hips->Status and hips->Status fields
- Return values:
-
IPS_StatusTypeDef status
Definition at line 96 of file VPS2535H.cpp.
| IPS_StatusTypeDef VPS2535H_init | ( | void | ) | [protected] |
Initializes the VPS2535H device.
- Parameters:
-
none
- Return values:
-
VPS2535H status
Definition at line 71 of file VPS2535H.cpp.
Generated on Sat Jul 16 2022 04:19:39 by
1.7.2

X-NUCLEO-IPS02A1 - 24V Intelligent power switch expansion board