stepdown7 2.1.0.0
stepdown7.h File Reference

This file contains API for Step Down 7 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  stepdown7_t
 Step Down 7 Click context object. More...
 
struct  stepdown7_cfg_t
 Step Down 7 Click configuration object. More...
 

Macros

#define STEPDOWN7_PFM_PWM_MODE   0x00
 Step Down 7 description setting.
 
#define STEPDOWN7_FORCED_PWM_MODE   0x01
 
#define STEPDOWN7_R1_RPROG_ADDRESS   0x00
 
#define STEPDOWN7_PIN_STATE_HIGH   0x01
 Step Down 7 pin state setting.
 
#define STEPDOWN7_PIN_STATE_LOW   0x00
 
#define STEPDOWN7_DIGIPOT_MAX_VALUE   100000ul
 Step Down 7 calculation setting.
 
#define STEPDOWN7_DIGIPOT_RESOLUTION   257
 
#define STEPDOWN7_ROUND_TO_NEAREST_INT   0.5
 
#define STEPDOWN7_R8_VALUE   15000u
 
#define STEPDOWN7_1V5_RESISTANCE   17500u
 
#define STEPDOWN7_2V5_RESISTANCE   42500u
 
#define STEPDOWN7_3V3_RESISTANCE   62500u
 
#define STEPDOWN7_OUTPUT_1V5   0
 Step Down 7 output voltage setting.
 
#define STEPDOWN7_OUTPUT_2V5   1
 
#define STEPDOWN7_OUTPUT_3V3   2
 
#define STEPDOWN7_ADDR_A2A1A0_000   0x28
 Step Down 7 device address setting.
 
#define STEPDOWN7_ADDR_A2A1A0_001   0x29
 
#define STEPDOWN7_ADDR_A2A1A0_010   0x2A
 
#define STEPDOWN7_ADDR_A2A1A0_011   0x2B
 
#define STEPDOWN7_ADDR_A2A1A0_100   0x2C
 
#define STEPDOWN7_ADDR_A2A1A0_101   0x2D
 
#define STEPDOWN7_ADDR_A2A1A0_110   0x2E
 
#define STEPDOWN7_ADDR_A2A1A0_111   0x2F
 
#define STEPDOWN7_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  stepdown7_return_value_t { STEPDOWN7_OK = 0 , STEPDOWN7_ERROR = -1 }
 Step Down 7 Click return value data. More...
 

Functions

void stepdown7_cfg_setup (stepdown7_cfg_t *cfg)
 Step Down 7 configuration object setup function.
 
err_t stepdown7_init (stepdown7_t *ctx, stepdown7_cfg_t *cfg)
 Step Down 7 initialization function.
 
err_t stepdown7_default_cfg (stepdown7_t *ctx)
 Step Down 7 default configuration function.
 
err_t stepdown7_generic_write (stepdown7_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 Step Down 7 I2C writing function.
 
err_t stepdown7_generic_read (stepdown7_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 Step Down 7 I2C reading function.
 
void stepdown7_set_mode (stepdown7_t *ctx, uint8_t mode)
 Step Down 5 mode selection function.
 
void stepdown7_set_en (stepdown7_t *ctx, uint8_t en_state)
 Step Down 5 set EN pin state function.
 
uint8_t stepdown7_get_pg_state (stepdown7_t *ctx)
 Step Down 5 get PG pin state function.
 
err_t stepdown7_set_wiper_pos (stepdown7_t *ctx, uint16_t wiper_pos)
 Step Down 5 set wiper 1 position.
 
err_t stepdown7_set_r1_resistance (stepdown7_t *ctx, uint32_t resistance)
 Step Down 7 set potentiometer resistance.
 
err_t stepdown7_set_output (stepdown7_t *ctx, uint8_t voltage)
 Step Down 7 set output voltage.
 

Detailed Description

This file contains API for Step Down 7 Click Driver.

Enumeration Type Documentation

◆ stepdown7_return_value_t

Step Down 7 Click return value data.

Predefined enum values for driver return values.

Enumerator
STEPDOWN7_OK 
STEPDOWN7_ERROR