digipot4 2.0.0.0
digipot4.h File Reference

This file contains API for Digi Pot 4 Click driver. More...

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

Go to the source code of this file.

Data Structures

struct  digipot4_t
 Click ctx object definition. More...
 
struct  digipot4_cfg_t
 Click configuration structure definition. More...
 

Macros

#define DIGIPOT4_MAP_MIKROBUS(cfg, mikrobus)
 
#define DIGIPOT4_RETVAL   uint8_t
 
#define DIGIPOT4_OK   0x00
 
#define DIGIPOT4_INIT_ERROR   0xFF
 
#define DIGIPOT4_WIPER_REG_1   0x01
 
#define DIGIPOT4_WIPER_REG_2   0x02
 
#define DIGIPOT4_NV_REG_1   0x11
 
#define DIGIPOT4_NV_REG_2   0x12
 
#define DIGIPOT4_COPY_WIPER_TO_NV_1   0x21
 
#define DIGIPOT4_COPY_WIPER_TO_NV_2   0x22
 
#define DIGIPOT4_COPY_WIPER_TO_NV_1_2   0x23
 
#define DIGIPOT4_COPY_NV_TO_WIPER_1   0x31
 
#define DIGIPOT4_COPY_NV_TO_WIPER_2   0x32
 
#define DIGIPOT4_COPY_NV_TO_WIPER_1_2   0x33
 

Functions

void digipot4_cfg_setup (digipot4_cfg_t *cfg)
 Config Object Initialization function.
 
DIGIPOT4_RETVAL digipot4_init (digipot4_t *ctx, digipot4_cfg_t *cfg)
 Initialization function.
 
void digipot4_generic_transfer (digipot4_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function.
 
void digipot4_write_reg (digipot4_t *ctx, uint8_t reg, uint16_t value)
 Writes data in register.
 
void digipot4_copy_reg (digipot4_t *ctx, uint8_t reg)
 Copy data.
 

Detailed Description

This file contains API for Digi Pot 4 Click driver.