solidswitch6
2.1.0.0
|
API for configuring and manipulating SolidSwitch 6 Click driver. More...
Modules | |
SolidSwitch 6 Registers List | |
List of registers of SolidSwitch 6 Click driver. | |
SolidSwitch 6 Registers Settings | |
Settings for registers of SolidSwitch 6 Click driver. | |
SolidSwitch 6 MikroBUS Map | |
MikroBUS pin mapping of SolidSwitch 6 Click driver. | |
Functions | |
void | solidswitch6_cfg_setup (solidswitch6_cfg_t *cfg) |
SolidSwitch 6 configuration object setup function. More... | |
err_t | solidswitch6_init (solidswitch6_t *ctx, solidswitch6_cfg_t *cfg) |
SolidSwitch 6 initialization function. More... | |
err_t | solidswitch6_default_cfg (solidswitch6_t *ctx) |
SolidSwitch 6 default configuration function. More... | |
err_t | solidswitch6_generic_write (solidswitch6_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
SolidSwitch 6 data writing function. More... | |
err_t | solidswitch6_generic_read (solidswitch6_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
SolidSwitch 6 data reading function. More... | |
err_t | solidswitch6_frame_write (solidswitch6_t *ctx, uint8_t reg, uint32_t data_in) |
SolidSwitch 6 SPI frame data writing function. More... | |
err_t | solidswitch6_frame_read (solidswitch6_t *ctx, uint8_t reg, uint32_t *data_out) |
SolidSwitch 6 SPI frame data reading function. More... | |
err_t | solidswitch6_frame_read_clear (solidswitch6_t *ctx, uint8_t reg, uint32_t data_in, uint32_t *data_out) |
SolidSwitch 6 SPI frame data read and clear function. More... | |
err_t | solidswitch6_read_rom (solidswitch6_t *ctx, uint8_t reg, uint8_t *data_out) |
SolidSwitch 6 SPI ROM frame data reading function. More... | |
err_t | solidswitch6_get_global_status (solidswitch6_t *ctx) |
SolidSwitch 6 get global status function. More... | |
err_t | solidswitch6_get_device_info (solidswitch6_t *ctx, solidswitch6_device_info_t *device_info) |
SolidSwitch 6 get device information function. More... | |
void | solidswitch6_lock_write (solidswitch6_t *ctx) |
SolidSwitch 6 lock write function. More... | |
void | solidswitch6_unlock_write (solidswitch6_t *ctx) |
SolidSwitch 6 unlock write function. More... | |
err_t | solidswitch6_set_control (solidswitch6_t *ctx, solidswitch6_ctrl_t ctrl) |
SolidSwitch 6 set control function. More... | |
err_t | solidswitch6_get_vsense (solidswitch6_t *ctx, float *vsense) |
SolidSwitch 6 get Vsense function. More... | |
err_t | solidswitch6_get_device_temperature (solidswitch6_t *ctx, float *tj) |
SolidSwitch 6 get device temperature function. More... | |
err_t | solidswitch6_get_vntc (solidswitch6_t *ctx, float *vntc) |
SolidSwitch 6 get Vntc function. More... | |
err_t | solidswitch6_get_vds (solidswitch6_t *ctx, float *vds) |
SolidSwitch 6 get VDS function. More... | |
err_t | solidswitch6_get_vout (solidswitch6_t *ctx, float *vout) |
SolidSwitch 6 get Vout function. More... | |
err_t | solidswitch6_get_st_vds (solidswitch6_t *ctx, float *st_vds) |
SolidSwitch 6 get VDS self-test function. More... | |
err_t | solidswitch6_get_st_stuck (solidswitch6_t *ctx, float *st_stuck) |
SolidSwitch 6 get VDS STUCK ON self-test function. More... | |
err_t | solidswitch6_get_st_curr (solidswitch6_t *ctx, float *st_curr) |
SolidSwitch 6 get self-test current sense amplifier function. More... | |
err_t | solidswitch6_get_vsense_hshd (solidswitch6_t *ctx, float *vsense_hshd) |
SolidSwitch 6 get Vsense HSHD function. More... | |
API for configuring and manipulating SolidSwitch 6 Click driver.
void solidswitch6_cfg_setup | ( | solidswitch6_cfg_t * | cfg | ) |
SolidSwitch 6 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See solidswitch6_cfg_t object definition for detailed explanation. |
err_t solidswitch6_default_cfg | ( | solidswitch6_t * | ctx | ) |
SolidSwitch 6 default configuration function.
This function executes a default configuration of SolidSwitch 6 click board.
[in] | ctx | : Click context object. See solidswitch6_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solidswitch6_frame_read | ( | solidswitch6_t * | ctx, |
uint8_t | reg, | ||
uint32_t * | data_out | ||
) |
SolidSwitch 6 SPI frame data reading function.
This function reads 24-bit data from the selected register using the SPI serial interface.
[in] | ctx | : Click context object. See solidswitch6_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solidswitch6_frame_read_clear | ( | solidswitch6_t * | ctx, |
uint8_t | reg, | ||
uint32_t | data_in, | ||
uint32_t * | data_out | ||
) |
SolidSwitch 6 SPI frame data read and clear function.
This function reads and clears 24-bit data from the selected register using the SPI serial interface.
[in] | ctx | : Click context object. See solidswitch6_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solidswitch6_frame_write | ( | solidswitch6_t * | ctx, |
uint8_t | reg, | ||
uint32_t | data_in | ||
) |
SolidSwitch 6 SPI frame data writing function.
This function writes 24-bit data to the selected register using the SPI serial interface.
[in] | ctx | : Click context object. See solidswitch6_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solidswitch6_generic_read | ( | solidswitch6_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
SolidSwitch 6 data reading function.
This function reads a desired number of data bytes starting from the selected register by using the SPI serial interface.
[in] | ctx | : Click context object. See solidswitch6_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solidswitch6_generic_write | ( | solidswitch6_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
SolidSwitch 6 data writing function.
This function writes a desired number of data bytes starting from the selected register by using the SPI serial interface.
[in] | ctx | : Click context object. See solidswitch6_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solidswitch6_get_device_info | ( | solidswitch6_t * | ctx, |
solidswitch6_device_info_t * | device_info | ||
) |
SolidSwitch 6 get device information function.
This function reads device information of Company Code, Device family, Product Code and Silicon version from the ROM memory using the SPI serial interface.
[in] | ctx | : Click context object. See solidswitch6_t object definition for detailed explanation. |
[out] | device_info | : Device information object. See solidswitch6_device_info_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solidswitch6_get_device_temperature | ( | solidswitch6_t * | ctx, |
float * | tj | ||
) |
SolidSwitch 6 get device temperature function.
This function reads the raw ADC value and converts it to device temperature in degrees Celsius using the SPI serial interface.
[in] | ctx | : Click context object. See solidswitch6_t object definition for detailed explanation. |
[out] | tj | : Temperature in degrees of Celsius. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solidswitch6_get_global_status | ( | solidswitch6_t * | ctx | ) |
SolidSwitch 6 get global status function.
This function reads global status flag using the SPI serial interface.
[in] | ctx | : Click context object. See solidswitch6_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solidswitch6_get_st_curr | ( | solidswitch6_t * | ctx, |
float * | st_curr | ||
) |
SolidSwitch 6 get self-test current sense amplifier function.
This function reads the raw ADC value and converts it to a proportional self-test current sense amplifier voltage level performed during CURRENT SENSE self-test and content of HSHT_SAR register latched during self-test execution using the SPI serial interface.
[in] | ctx | : Click context object. See solidswitch6_t object definition for detailed explanation. |
[out] | st_curr | : Current sense amplifier voltage self-test [0-160mV]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solidswitch6_get_st_stuck | ( | solidswitch6_t * | ctx, |
float * | st_stuck | ||
) |
SolidSwitch 6 get VDS STUCK ON self-test function.
This function reads the raw ADC value and converts it to a proportional voltage level across HS switch (VS-OUT) STUCK ON performed during STUCK ON self-test using the SPI serial interface.
[in] | ctx | : Click context object. See solidswitch6_t object definition for detailed explanation. |
[out] | st_stuck | : Voltage across HS switch during STUCK ON self-test [300-1800mV]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solidswitch6_get_st_vds | ( | solidswitch6_t * | ctx, |
float * | st_vds | ||
) |
SolidSwitch 6 get VDS self-test function.
This function reads the raw ADC value and converts it to a proportional voltage level across HS switch (VS-OUT) performed during VDS self-test and content of VDS register latched during selftest execution using the SPI serial interface.
[in] | ctx | : Click context object. See solidswitch6_t object definition for detailed explanation. |
[out] | st_vds | : Voltage across HS switch during self-test [300-1800mV]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solidswitch6_get_vds | ( | solidswitch6_t * | ctx, |
float * | vds | ||
) |
SolidSwitch 6 get VDS function.
This function reads the raw ADC value and converts it to a proportional voltage level across HS switch (VS-OUT) using the SPI serial interface.
[in] | ctx | : Click context object. See solidswitch6_t object definition for detailed explanation. |
[out] | vds | : Voltage across HS switch [300-1800mV]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solidswitch6_get_vntc | ( | solidswitch6_t * | ctx, |
float * | vntc | ||
) |
SolidSwitch 6 get Vntc function.
This function reads the raw ADC value and converts it to a proportional NTC voltage level using the SPI serial interface.
[in] | ctx | : Click context object. See solidswitch6_t object definition for detailed explanation. |
[out] | vntc | : NTC voltage level [0/1.7-3.6/5.3V]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solidswitch6_get_vout | ( | solidswitch6_t * | ctx, |
float * | vout | ||
) |
SolidSwitch 6 get Vout function.
This function reads the raw ADC value and converts it to a proportional voltage level using the SPI serial interface.
[in] | ctx | : Click context object. See solidswitch6_t object definition for detailed explanation. |
[out] | vout | : Output voltage level [V]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solidswitch6_get_vsense | ( | solidswitch6_t * | ctx, |
float * | vsense | ||
) |
SolidSwitch 6 get Vsense function.
This function reads the raw ADC value and converts it to a proportional current sense amplifier voltage level using the SPI serial interface.
[in] | ctx | : Click context object. See solidswitch6_t object definition for detailed explanation. |
[out] | vsense | : Current sense amplifier voltage [0-160mV]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solidswitch6_get_vsense_hshd | ( | solidswitch6_t * | ctx, |
float * | vsense_hshd | ||
) |
SolidSwitch 6 get Vsense HSHD function.
This function reads the raw ADC value and converts it to a proportional SAR fast current sense amplifier voltage level ranging from 0 V to 160 mV; unidirectional current through an external sense resistor during self-test execution using the SPI serial interface.
[in] | ctx | : Click context object. See solidswitch6_t object definition for detailed explanation. |
[out] | vsense_hshd | : SAR fast current sense amplifier voltage [0-160mV]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solidswitch6_init | ( | solidswitch6_t * | ctx, |
solidswitch6_cfg_t * | cfg | ||
) |
SolidSwitch 6 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See solidswitch6_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See solidswitch6_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void solidswitch6_lock_write | ( | solidswitch6_t * | ctx | ) |
SolidSwitch 6 lock write function.
This function performs transitions to states where the registers are locked from writing using the SPI serial interface.
[in] | ctx | : Click context object. See solidswitch6_t object definition for detailed explanation. |
err_t solidswitch6_read_rom | ( | solidswitch6_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out | ||
) |
SolidSwitch 6 SPI ROM frame data reading function.
This function reads data byte from the selected ROM memory using the SPI serial interface.
[in] | ctx | : Click context object. See solidswitch6_t object definition for detailed explanation. |
[in] | reg | : ROM memory address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t solidswitch6_set_control | ( | solidswitch6_t * | ctx, |
solidswitch6_ctrl_t | ctrl | ||
) |
SolidSwitch 6 set control function.
This function writes control registers to configure the switch controller using the SPI serial interface.
[in] | ctx | : Click context object. See solidswitch6_t object definition for detailed explanation. |
[] | ctrl : Control object. See solidswitch6_ctrl_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void solidswitch6_unlock_write | ( | solidswitch6_t * | ctx | ) |
SolidSwitch 6 unlock write function.
This function performs transitions to states where the registers are unlocked from writing using the SPI serial interface.
[in] | ctx | : Click context object. See solidswitch6_t object definition for detailed explanation. |