currentlimit6 2.0.0.0
Current Limit 6 Click Driver

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

Topics

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

Functions

void currentlimit6_cfg_setup (currentlimit6_cfg_t *cfg)
 Current Limit 6 configuration object setup function.
 
err_t currentlimit6_init (currentlimit6_t *ctx, currentlimit6_cfg_t *cfg)
 Current Limit 6 initialization function.
 
err_t currentlimit6_default_cfg (currentlimit6_t *ctx)
 Current Limit 6 default configuration function.
 
err_t currentlimit6_power_mode (currentlimit6_t *ctx, currentlimit6_pwr_mode_value_t pwr_mode)
 Current Limit 6 power mode function.
 
err_t currentlimit6_generic_write (currentlimit6_t *ctx, uint8_t data_in)
 Current Limit 6 data writing function.
 
err_t currentlimit6_set_current_limit (currentlimit6_t *ctx, float current_limit)
 Current Limit 6 set current limit function.
 
uint8_t currentlimit6_check_limit_exceeded (currentlimit6_t *ctx)
 Current Limit 6 check limit exceeded function.
 
uint8_t currentlimit6_check_voltage_err (currentlimit6_t *ctx)
 Current Limit 6 check voltage error function.
 

Detailed Description

API for configuring and manipulating Current Limit 6 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

◆ currentlimit6_cfg_setup()

void currentlimit6_cfg_setup ( currentlimit6_cfg_t * cfg)

Current Limit 6 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ currentlimit6_check_limit_exceeded()

uint8_t currentlimit6_check_limit_exceeded ( currentlimit6_t * ctx)

Current Limit 6 check limit exceeded function.

This function checks limit exceeded of the MAX17608 4.5V to 60V, 1A Current Limiter with OV, UV, and Reverse Protection on the Current Limit 6 click board™.

Parameters
[in]ctx: Click context object. See currentlimit6_t object definition for detailed explanation.
Returns
  • 0 - Overcurrent duration exceeds the blanking time, reverse current is detected, thermal shutdown is active or Rseti is less than 1kΩ,
  • 1 - Normal.
See #err_t definition for detailed explanation.
Note
None.

◆ currentlimit6_check_voltage_err()

uint8_t currentlimit6_check_voltage_err ( currentlimit6_t * ctx)

Current Limit 6 check voltage error function.

This function check the voltage error of the MAX17608 4.5V to 60V, 1A Current Limiter with OV, UV, and Reverse Protection on the Current Limit 6 click board™.

Parameters
[in]ctx: Click context object. See currentlimit6_t object definition for detailed explanation.
Returns
  • 0 - Input voltage falls below UVLO threshold or input voltage rises above OVLO threshold,
  • 1 - Input voltage is OK.
See #err_t definition for detailed explanation.
Note
None.

◆ currentlimit6_default_cfg()

err_t currentlimit6_default_cfg ( currentlimit6_t * ctx)

Current Limit 6 default configuration function.

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

Parameters
[in]ctx: Click context object. See currentlimit6_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.

◆ currentlimit6_generic_write()

err_t currentlimit6_generic_write ( currentlimit6_t * ctx,
uint8_t data_in )

Current Limit 6 data writing function.

This function writes a desired number of data bytes starting from the selected register by using SPI serial interface.

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

◆ currentlimit6_init()

err_t currentlimit6_init ( currentlimit6_t * ctx,
currentlimit6_cfg_t * cfg )

Current Limit 6 initialization function.

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

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

◆ currentlimit6_power_mode()

err_t currentlimit6_power_mode ( currentlimit6_t * ctx,
currentlimit6_pwr_mode_value_t pwr_mode )

Current Limit 6 power mode function.

This function executes the desired power mode of the MAX17608 4.5V to 60V, 1A Current Limiter with OV, UV, and Reverse Protection on the Current Limit 6 click board™.

Parameters
[in]ctx: Click context object. See currentlimit6_t object definition for detailed explanation.
[in]pwr_mode:
  • 0 ( CURRENTLIMIT6_PWR_OFF ) - Power off,
  • 1 ( CURRENTLIMIT6_PWR_ON ) - Power on.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ currentlimit6_set_current_limit()

err_t currentlimit6_set_current_limit ( currentlimit6_t * ctx,
float current_limit )

Current Limit 6 set current limit function.

This function set current limit ( A ) of the MAX17608 4.5V to 60V, 1A Current Limiter with OV, UV, and Reverse Protection on the Current Limit 6 click board™.

Parameters
[in]ctx: Click context object. See currentlimit6_t object definition for detailed explanation.
[in]current_limit: Desired current limit [ 0.100 A : 1.0 A ]
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.