digipot8 2.0.0.0
digipot8.h File Reference

This file contains API for DIGI POT 8 Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"
#include "drv_analog_in.h"

Go to the source code of this file.

Data Structures

struct  digipot8_t
 DIGI POT 8 Click context object. More...
 
struct  digipot8_cfg_t
 DIGI POT 8 Click configuration object. More...
 

Macros

#define DIGIPOT8_REG_RDAC1   0x00
 DIGI POT 8 description register.
 
#define DIGIPOT8_REG_RDAC2   0x01
 
#define DIGIPOT8_REG_RDAC3   0x02
 
#define DIGIPOT8_REG_RDAC4   0x03
 
#define DIGIPOT8_REG_RDAC5   0x04
 
#define DIGIPOT8_REG_RDAC6   0x05
 
#define DIGIPOT8_WIPER_POSITION_MIN   0x00
 DIGI POT 8 description setting.
 
#define DIGIPOT8_WIPER_POSITION_MAX   0xFF
 
#define DIGIPOT8_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  digipot8_return_value_t { DIGIPOT8_OK = 0 , DIGIPOT8_ERROR = -1 }
 DIGI POT 8 Click return value data. More...
 

Functions

void digipot8_cfg_setup (digipot8_cfg_t *cfg)
 DIGI POT 8 configuration object setup function.
 
err_t digipot8_init (digipot8_t *ctx, digipot8_cfg_t *cfg)
 DIGI POT 8 initialization function.
 
err_t digipot8_write_data (digipot8_t *ctx, uint8_t reg, uint8_t data_in)
 DIGI POT 8 write data function.
 
err_t digipot8_set_wiper_1 (digipot8_t *ctx, uint8_t data_in)
 DIGI POT 8 set wiper 1 function.
 
err_t digipot8_set_wiper_2 (digipot8_t *ctx, uint8_t data_in)
 DIGI POT 8 set wiper 2 function.
 
err_t digipot8_set_wiper_3 (digipot8_t *ctx, uint8_t data_in)
 DIGI POT 8 set wiper 3 function.
 
err_t digipot8_set_wiper_4 (digipot8_t *ctx, uint8_t data_in)
 DIGI POT 8 set wiper 4 function.
 
err_t digipot8_set_wiper_5 (digipot8_t *ctx, uint8_t data_in)
 DIGI POT 8 set wiper 5 function.
 
err_t digipot8_set_wiper_6 (digipot8_t *ctx, uint8_t data_in)
 DIGI POT 8 set wiper 6 function.
 
uint16_t digipot8_generic_read (digipot8_t *ctx)
 Generic read function.
 
float digipot8_read_voltage (digipot8_t *ctx)
 Generic read function.
 

Detailed Description

This file contains API for DIGI POT 8 Click Driver.

Enumeration Type Documentation

◆ digipot8_return_value_t

DIGI POT 8 Click return value data.

Predefined enum values for driver return values.

Enumerator
DIGIPOT8_OK 
DIGIPOT8_ERROR