currentlimit10 2.1.0.0
currentlimit10.h File Reference

This file contains API for Current Limit 10 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  currentlimit10_t
 Current Limit 10 Click context object. More...
 
struct  currentlimit10_cfg_t
 Current Limit 10 Click configuration object. More...
 

Macros

#define CURRENTLIMIT10_CMD_VREG   0x11
 Current Limit 10 description register.
 
#define CURRENTLIMIT10_CMD_NVREG   0x21
 
#define CURRENTLIMIT10_CMD_VREGxNVREG   0x51
 
#define CURRENTLIMIT10_CMD_NVREGxVREG   0x61
 
#define CURRENTLIMIT10_WIPER_POS_MIN   0
 Current Limit 10 wiper and resistance data values.
 
#define CURRENTLIMIT10_WIPER_POS_MIDDLE   127
 
#define CURRENTLIMIT10_WIPER_POS_MAX   255
 
#define CURRENTLIMIT10_RES_200_KOHM   200.0f
 
#define CURRENTLIMIT10_FAULT_FLAG   0
 Current Limit 10 wiper and resistance data values.
 
#define CURRENTLIMIT10_COEFF_MULTI   0.37f
 Current Limit 10 current limit data values.
 
#define CURRENTLIMIT10_TYP_V_ILIM_MV   289.0f
 
#define CURRENTLIMIT10_RES_L_20_KOHM   20.0f
 
#define CURRENTLIMIT10_LIMIT_MIN   0.5f
 
#define CURRENTLIMIT10_LIMIT_MAX   5.5f
 
#define CURRENTLIMIT10_DEVICE_ADDRESS   0x28
 Current Limit 10 device address setting.
 
#define CURRENTLIMIT10_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  currentlimit10_return_value_t { CURRENTLIMIT10_OK = 0 , CURRENTLIMIT10_ERROR = -1 }
 Current Limit 10 Click return value data. More...
 

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

This file contains API for Current Limit 10 Click Driver.

Enumeration Type Documentation

◆ currentlimit10_return_value_t

Current Limit 10 Click return value data.

Predefined enum values for driver return values.

Enumerator
CURRENTLIMIT10_OK 
CURRENTLIMIT10_ERROR