currentlimit5 2.0.0.0
currentlimit5.h File Reference

This file contains API for Current Limit 5 Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  currentlimit5_t
 Current Limit 5 Click context object. More...
 
struct  currentlimit5_cfg_t
 Current Limit 5 Click configuration object. More...
 

Macros

#define CURRENTLIMIT5_DIGIPOT_MAX_VALUE   5000
 Current Limit 5 calculation values.
 
#define CURRENTLIMIT5_DIGIPOT_OFFSET   80
 
#define CURRENTLIMIT5_DIGIPOT_RESOLUTION   257
 
#define CURRENTLIMIT5_ROUND_TO_NEAREST_INT   0.5
 
#define CURRENTLIMIT5_SET_DEV_ADDR   0x2F
 Current Limit 5 device address setting.
 
#define CURRENTLIMIT5_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  currentlimit5_return_value_t { CURRENTLIMIT5_OK = 0 , CURRENTLIMIT5_ERROR = -1 }
 Current Limit 5 Click return value data. More...
 
enum  currentlimit5_ilimit_t {
  CURRENTLIMIT5_ILIMIT_100mA = 0 , CURRENTLIMIT5_ILIMIT_200mA , CURRENTLIMIT5_ILIMIT_300mA , CURRENTLIMIT5_ILIMIT_400mA ,
  CURRENTLIMIT5_ILIMIT_500mA , CURRENTLIMIT5_ILIMIT_600mA , CURRENTLIMIT5_ILIMIT_700mA , CURRENTLIMIT5_ILIMIT_800mA ,
  CURRENTLIMIT5_ILIMIT_900mA , CURRENTLIMIT5_ILIMIT_1000mA , CURRENTLIMIT5_ILIMIT_1100mA
}
 Current Limit 5 Click Ilimit values. More...
 

Functions

void currentlimit5_cfg_setup (currentlimit5_cfg_t *cfg)
 Current Limit 5 configuration object setup function.
 
err_t currentlimit5_init (currentlimit5_t *ctx, currentlimit5_cfg_t *cfg)
 Current Limit 5 initialization function.
 
err_t currentlimit5_default_cfg (currentlimit5_t *ctx)
 Current Limit 5 default configuration function.
 
err_t currentlimit5_set_ilimit (currentlimit5_t *ctx, currentlimit5_ilimit_t ilimit)
 Current Limit 5 set ilimit function.
 
uint8_t currentlimit5_get_fault_pin (currentlimit5_t *ctx)
 Current Limit 5 get fault pin function.
 
void currentlimit5_enable_limit (currentlimit5_t *ctx)
 Current Limit 5 enable limit function.
 
void currentlimit5_disable_limit (currentlimit5_t *ctx)
 Current Limit 5 disable limit function.
 

Detailed Description

This file contains API for Current Limit 5 Click Driver.

Enumeration Type Documentation

◆ currentlimit5_ilimit_t

Current Limit 5 Click Ilimit values.

Predefined enum values for Ilimit.

Enumerator
CURRENTLIMIT5_ILIMIT_100mA 
CURRENTLIMIT5_ILIMIT_200mA 
CURRENTLIMIT5_ILIMIT_300mA 
CURRENTLIMIT5_ILIMIT_400mA 
CURRENTLIMIT5_ILIMIT_500mA 
CURRENTLIMIT5_ILIMIT_600mA 
CURRENTLIMIT5_ILIMIT_700mA 
CURRENTLIMIT5_ILIMIT_800mA 
CURRENTLIMIT5_ILIMIT_900mA 
CURRENTLIMIT5_ILIMIT_1000mA 
CURRENTLIMIT5_ILIMIT_1100mA 

◆ currentlimit5_return_value_t

Current Limit 5 Click return value data.

Predefined enum values for driver return values.

Enumerator
CURRENTLIMIT5_OK 
CURRENTLIMIT5_ERROR