digipot6 2.0.0.0
digipot6.h File Reference

This file contains API for DIGI POT 6 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  digipot6_t
 Click ctx object definition. More...
 
struct  digipot6_cfg_t
 Click configuration structure definition. More...
 

Macros

#define DIGIPOT6_MAP_MIKROBUS(cfg, mikrobus)
 
#define DIGIPOT6_RETVAL   uint8_t
 
#define DIGIPOT6_OK   0x00
 
#define DIGIPOT6_INIT_ERROR   0xFF
 
#define DIGIPOT6_CMD_WRITE   0x00
 
#define DIGIPOT6_CMD_INCREMENT   0x01
 
#define DIGIPOT6_CMD_DECREMENT   0x02
 
#define DIGIPOT6_CMD_READ   0x03
 
#define DIGIPOT6_VOLATILE_WIPER_0   0x00
 
#define DIGIPOT6_TCON_REG   0x04
 
#define DIGIPOT6_TCON_R0B   0xF1
 
#define DIGIPOT6_TCON_R0W   0xF2
 
#define DIGIPOT6_TCON_R0A   0xF4
 
#define DIGIPOT6_TCON_R0HW   0xF8
 
#define DIGIPOT6_TCON_MASK_R0B   0xFE
 
#define DIGIPOT6_TCON_MASK_R0W   0xFD
 
#define DIGIPOT6_TCON_MASK_R0A   0xFB
 
#define DIGIPOT6_TCON_MASK_R0HW   0xF7
 
#define DIGIPOT6_CONNECT   0x01
 
#define DIGIPOT6_DISCONNECT   0x00
 

Functions

void digipot6_cfg_setup (digipot6_cfg_t *cfg)
 Config Object Initialization function.
 
DIGIPOT6_RETVAL digipot6_init (digipot6_t *ctx, digipot6_cfg_t *cfg)
 Initialization function.
 
void digipot6_default_cfg (digipot6_t *ctx)
 Click Default Configuration function.
 
void digipot6_write_data (digipot6_t *ctx, uint8_t reg, uint8_t w_data)
 Write data function.
 
void digipot6_write_wiper_cmd (digipot6_t *ctx, uint8_t cmd)
 Write wiper command function.
 
uint8_t digipot6_read_data (digipot6_t *ctx, uint8_t reg)
 Read data function.
 
void digipot6_set_resistor (digipot6_t *ctx, uint8_t state, uint8_t mask, uint8_t tcon)
 Set resistor function.
 

Detailed Description

This file contains API for DIGI POT 6 Click driver.