buck 2.0.0.0
buck.h File Reference

This file contains API for BUCK Click driver. More...

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

Go to the source code of this file.

Data Structures

struct  buck_t
 Click ctx object definition. More...
 
struct  buck_cfg_t
 Click configuration structure definition. More...
 

Macros

#define BUCK_MAP_MIKROBUS(cfg, mikrobus)
 
#define BUCK_RETVAL   uint8_t
 
#define BUCK_OK   0x00
 
#define BUCK_INIT_ERROR   0xFF
 
#define BUCK_DEVICE_DISABLE   0
 
#define BUCK_DEVICE_ENABLE   1
 
#define BUCK_FREQ_400KHz   0x00
 
#define BUCK_FREQ_1200KHz   0x01
 
#define BUCK_FREQ_800KHz   0x02
 
#define BUCK_FREQ_1600KHz   0x03
 
#define BUCK_SET_MULTIPLEXER_A0   0
 
#define BUCK_SET_MULTIPLEXER_A1   1
 

Functions

void buck_cfg_setup (buck_cfg_t *cfg)
 Config Object Initialization function.
 
BUCK_RETVAL buck_init (buck_t *ctx, buck_cfg_t *cfg)
 Initialization function.
 
void buck_default_cfg (buck_t *ctx)
 Click Default Configuration function.
 
void buck_device_reset (buck_t *ctx)
 Device reset chip function.
 
void buck_set_mode (buck_t *ctx, uint8_t mode)
 Select buck mode (Disable / Enable)
 
uint8_t buck_get_power_good (buck_t *ctx)
 Get state internal comparator function.
 
void buck_set_multiplexer_state (buck_t *ctx, uint8_t mux, uint8_t state)
 Set multiplexer (A0 or A1) state.
 
void buck_switch_frequency (buck_t *ctx, uint8_t frequency)
 Setting the switching frequency function.
 

Detailed Description

This file contains API for BUCK Click driver.