mic24045 2.0.0.0
mic24045.h File Reference

This file contains API for MIC24045 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  mic24045_t
 Click ctx object definition. More...
 
struct  mic24045_cfg_t
 Click configuration structure definition. More...
 

Macros

#define MIC24045_MAP_MIKROBUS(cfg, mikrobus)
 
#define MIC24045_RETVAL   uint8_t
 
#define MIC24045_OK   0x00
 
#define MIC24045_INIT_ERROR   0xFF
 
#define MIC24045_I2C_ADDRESS   0x50
 
#define MIC24045_REG_STATUS   0x00
 
#define MIC24045_REG_SETTINGS1   0x01
 
#define MIC24045_REG_SETTINGS2   0x02
 
#define MIC24045_REG_VOUT   0x03
 
#define MIC24045_REG_COMMAND   0x04
 
#define MIC24045_BIT_PGS   0x01
 
#define MIC24045_BIT_ENS   0x08
 
#define MIC24045_BIT_THWRNF   0x20
 
#define MIC24045_BIT_THSDF   0x40
 
#define MIC24045_BIT_OCF   0x80
 
#define MIC24045_BIT_CIFF   0x01
 
#define MIC24045_SETTING_CURRENT_NORMAL_LOAD_2_A   0x00
 
#define MIC24045_SETTING_CURRENT_NORMAL_LOAD_3_A   0x40
 
#define MIC24045_SETTING_CURRENT_NORMAL_LOAD_4_A   0x80
 
#define MIC24045_SETTING_CURRENT_NORMAL_LOAD_5_A   0xC0
 
#define MIC24045_SETTING_FREQUENCY_310_kHz   0x00
 
#define MIC24045_SETTING_FREQUENCY_400_kHz   0x08
 
#define MIC24045_SETTING_FREQUENCY_500_kHz   0x10
 
#define MIC24045_SETTING_FREQUENCY_570_kHz   0x18
 
#define MIC24045_SETTING_FREQUENCY_660_kHz   0x20
 
#define MIC24045_SETTING_FREQUENCY_780_kHz   0x28
 
#define MIC24045_SETTING_FREQUENCY_970_kHz   0x30
 
#define MIC24045_SETTING_FREQUENCY_1200_kHz   0x38
 
#define MIC24045_SETTING_START_UP_DELAY_0_ms   0x00
 
#define MIC24045_SETTING_START_UP_DELAY_0_5_ms   0x10
 
#define MIC24045_SETTING_START_UP_DELAY_1_ms   0x20
 
#define MIC24045_SETTING_START_UP_DELAY_2_ms   0x30
 
#define MIC24045_SETTING_START_UP_DELAY_4_ms   0x40
 
#define MIC24045_SETTING_START_UP_DELAY_6_ms   0x50
 
#define MIC24045_SETTING_START_UP_DELAY_8_ms   0x60
 
#define MIC24045_SETTING_START_UP_DELAY_10_ms   0x70
 
#define MIC24045_SETTING_CHANGE_NOMINAL_0_PERC   0x00
 
#define MIC24045_SETTING_CHANGE_NOMINAL_NEG_5_PERC   0x04
 
#define MIC24045_SETTING_CHANGE_NOMINAL_POS_5_PERC   0x08
 
#define MIC24045_SETTING_CHANGE_NOMINAL_POS_5_0_PERC   0x0C
 
#define MIC24045_SETTING_SOFT_START_SLOPE_0_16_Vms   0x00
 
#define MIC24045_SETTING_SOFT_START_SLOPE_0_38_Vms   0x01
 
#define MIC24045_SETTING_SOFT_START_SLOPE_0_76_Vms   0x02
 
#define MIC24045_SETTING_SOFT_START_SLOPE_1_50_Vms   0x03
 
#define MIC24045_MAX_VOUT   5.250
 
#define MIC24045_MIN_VOUT   0.640
 
#define MIC24045_MAX_VOUT_DEC   0xFF
 
#define MIC24045_MIN_VOUT_DEC   0x00
 

Functions

void mic24045_cfg_setup (mic24045_cfg_t *cfg)
 Config Object Initialization function.
 
MIC24045_RETVAL mic24045_init (mic24045_t *ctx, mic24045_cfg_t *cfg)
 Initialization function.
 
void mic24045_generic_write (mic24045_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void mic24045_generic_read (mic24045_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
uint8_t mic24045_get_status (mic24045_t *ctx)
 Get status function.
 
float mic24045_get_vout (mic24045_t *ctx)
 Get voltage.
 
void mic24045_set_vout (mic24045_t *ctx, float v_out)
 Set voltage.
 
void mic24045_set_vout_decimal (mic24045_t *ctx, uint8_t dec)
 Set voltage decimal.
 
void mic24045_enable (mic24045_t *ctx)
 Enable voltage output.
 
void mic24045_disable (mic24045_t *ctx)
 Disable voltage output.
 
uint8_t mic24045_get_power_good_state (mic24045_t *ctx)
 Get power good state.
 

Detailed Description

This file contains API for MIC24045 Click driver.