currentlimit10 2.1.0.0
Current Limit 10 Click Driver

API for configuring and manipulating Current Limit 10 Click driver. More...

Topics

 Current Limit 10 Registers List
 List of registers of Current Limit 10 Click driver.
 
 Current Limit 10 Registers Settings
 Settings for registers of Current Limit 10 Click driver.
 
 Current Limit 10 MikroBUS Map
 MikroBUS pin mapping of Current Limit 10 Click driver.
 

Functions

void currentlimit10_cfg_setup (currentlimit10_cfg_t *cfg)
 Current Limit 10 configuration object setup function.
 
err_t currentlimit10_init (currentlimit10_t *ctx, currentlimit10_cfg_t *cfg)
 Current Limit 10 initialization function.
 
err_t currentlimit10_default_cfg (currentlimit10_t *ctx)
 Current Limit 10 default configuration function.
 
void currentlimit10_enable (currentlimit10_t *ctx)
 Current Limit 10 enable the device function.
 
void currentlimit10_disable (currentlimit10_t *ctx)
 Current Limit 10 disable the device function.
 
err_t currentlimit10_write_data (currentlimit10_t *ctx, uint8_t cmd, uint8_t data_in)
 Current Limit 10 I2C writing function.
 
err_t currentlimit10_set_wiper_pos (currentlimit10_t *ctx, uint8_t wiper_pos)
 Current Limit 10 sets the wiper position function.
 
err_t currentlimit10_set_resistance (currentlimit10_t *ctx, float res_kohm)
 Current Limit 10 sets the resistance function.
 
err_t currentlimit10_set_limit (currentlimit10_t *ctx, float current_limit)
 Current Limit 10 sets the current limit function.
 
uint8_t currentlimit10_get_fault (currentlimit10_t *ctx)
 Current Limit 10 get the fault flag function.
 

Detailed Description

API for configuring and manipulating Current Limit 10 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ currentlimit10_cfg_setup()

void currentlimit10_cfg_setup ( currentlimit10_cfg_t * cfg)

Current Limit 10 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See currentlimit10_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ currentlimit10_default_cfg()

err_t currentlimit10_default_cfg ( currentlimit10_t * ctx)

Current Limit 10 default configuration function.

This function executes a default configuration of Current Limit 10 click board.

Parameters
[in]ctx: Click context object. See currentlimit10_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ currentlimit10_disable()

void currentlimit10_disable ( currentlimit10_t * ctx)

Current Limit 10 disable the device function.

This function turns off power switch and disable of the HS2950P, 29V 5A Load Protection HotSwitch with Adjustable OVP, OCP and SS on the Current Limit 10 Click board.

Parameters
[in]ctx: Click context object. See currentlimit10_t object definition for detailed explanation.
Returns
Nothing.
Note
None.

◆ currentlimit10_enable()

void currentlimit10_enable ( currentlimit10_t * ctx)

Current Limit 10 enable the device function.

This function turns on the power switch and enables the internal MOSFET of the HS2950P, 29V 5A Load Protection HotSwitch with Adjustable OVP, OCP and SS on the Current Limit 10 Click board.

Parameters
[in]ctx: Click context object. See currentlimit10_t object definition for detailed explanation.
Returns
Nothing.
Note
None.

◆ currentlimit10_get_fault()

uint8_t currentlimit10_get_fault ( currentlimit10_t * ctx)

Current Limit 10 get the fault flag function.

This function gets the state of the fault flag to indicate overcurrent, overtemperature, or reverse-voltage conditions of the HS2950P, 29V 5A Load Protection HotSwitch with Adjustable OVP, OCP and SS on the Current Limit 10 Click board.

Parameters
[in]ctx: Click context object. See currentlimit10_t object definition for detailed explanation.
[in]current_limit: Current limit [0.5mA-5.5mA]
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ currentlimit10_init()

err_t currentlimit10_init ( currentlimit10_t * ctx,
currentlimit10_cfg_t * cfg )

Current Limit 10 initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See currentlimit10_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See currentlimit10_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ currentlimit10_set_limit()

err_t currentlimit10_set_limit ( currentlimit10_t * ctx,
float current_limit )

Current Limit 10 sets the current limit function.

This function sets the desired current limit threshold using the I2C serial interface.

Parameters
[in]ctx: Click context object. See currentlimit10_t object definition for detailed explanation.
[in]current_limit: Current limit [0.5mA-5.5mA]
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ currentlimit10_set_resistance()

err_t currentlimit10_set_resistance ( currentlimit10_t * ctx,
float res_kohm )

Current Limit 10 sets the resistance function.

This function sets the resistance of the MAX5419LETA+T, 256-Tap, Nonvolatile, I2C-Interface, Digital Potentiometers on the Current Limit 10 Click board.

Parameters
[in]ctx: Click context object. See currentlimit10_t object definition for detailed explanation.
[in]res_kohm: Resistance [0-200kOhm].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ currentlimit10_set_wiper_pos()

err_t currentlimit10_set_wiper_pos ( currentlimit10_t * ctx,
uint8_t wiper_pos )

Current Limit 10 sets the wiper position function.

This function sets the wiper position of the MAX5419LETA+T, 256-Tap, Nonvolatile, I2C-Interface, Digital Potentiometers on the Current Limit 10 Click board.

Parameters
[in]ctx: Click context object. See currentlimit10_t object definition for detailed explanation.
[in]wiper_pos: Wiper position [0-255].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ currentlimit10_write_data()

err_t currentlimit10_write_data ( currentlimit10_t * ctx,
uint8_t cmd,
uint8_t data_in )

Current Limit 10 I2C writing function.

This function writes the desired byte of data using the selected command using the I2C serial interface.

Parameters
[in]ctx: Click context object. See currentlimit10_t object definition for detailed explanation.
[in]cmd: Desired command.
[in]data_in: Data to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.