buck11 2.0.0.0
buck11.h File Reference

This file contains API for Buck 11 Click driver. More...

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

Go to the source code of this file.

Data Structures

struct  buck11_t
 Click ctx object definition. More...
 
struct  buck11_cfg_t
 Click configuration structure definition. More...
 

Macros

#define BUCK11_MAP_MIKROBUS(cfg, mikrobus)
 
#define BUCK11_RETVAL   uint8_t
 
#define BUCK11_OK   0x00
 
#define BUCK11_INIT_ERROR   0xFF
 
#define BUCK11_MCP3221A5T_DEV_ADDR   0x4D
 
#define BUCK11_VOUT_VOLTS   0x00
 
#define BUCK11_VOUT_MILLIVOLTS   0x01
 

Functions

void buck11_cfg_setup (buck11_cfg_t *cfg)
 Config Object Initialization function.
 
BUCK11_RETVAL buck11_init (buck11_t *ctx, buck11_cfg_t *cfg)
 Initialization function.
 
void buck11_generic_write (buck11_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void buck11_generic_read (buck11_t *ctx, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void buck11_set_vdd_value (float vdd_volts)
 Set VDD Value function.
 
uint16_t buck11_read_adc (buck11_t *ctx)
 ADC Read function.
 
float buck11_get_vout (buck11_t *ctx, uint8_t vout_resolution)
 Get VOUT function.
 
float buck11_get_averaged_vout (buck11_t *ctx, uint8_t vout_resolution, uint8_t n_samples)
 Get Averaged VOUT function.
 

Detailed Description

This file contains API for Buck 11 Click driver.