digipot 2.0.0.0
|
This file contains API for DIGI POT Click Driver. More...
#include "drv_digital_out.h"
#include "drv_spi_master.h"
Go to the source code of this file.
Data Structures | |
struct | digipot_t |
DIGI POT Click context object. More... | |
struct | digipot_cfg_t |
DIGI POT Click configuration object. More... | |
Macros | |
#define | DIGIPOT_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. | |
#define | DIGIPOT_DATA_EEPROM_6 0x06 |
DIGI POT EEPROM data. | |
#define | DIGIPOT_DATA_EEPROM_7 0x07 |
#define | DIGIPOT_DATA_EEPROM_8 0x08 |
#define | DIGIPOT_DATA_EEPROM_9 0x09 |
#define | DIGIPOT_DATA_EEPROM_A 0x0A |
#define | DIGIPOT_DATA_EEPROM_B 0x0B |
#define | DIGIPOT_DATA_EEPROM_C 0x0C |
#define | DIGIPOT_DATA_EEPROM_D 0x0D |
#define | DIGIPOT_DATA_EEPROM_E 0x0E |
#define | DIGIPOT_DATA_EEPROM_F 0x0F |
#define | DIGIPOT_DATA_WRITE_CMD 0x20 |
#define | DIGIPOT_VOLATILE_WIPER_0 0x00 |
DIGI POT DIGIPOT Command. | |
#define | DIGIPOT_VOLATILE_WIPER_1 0x01 |
#define | DIGIPOT_NON_VOLATILE_WIPER_0 0x02 |
#define | DIGIPOT_NON_VOLATILE_WIPER_1 0x03 |
#define | DIGIPOT_VOLATILE_TCON_REGISTER 0x04 |
#define | DIGIPOT_STATUS_REGISTER 0x05 |
Enumerations | |
enum | digipot_return_value_t { DIGIPOT_OK = 0 , DIGIPOT_ERROR = -1 } |
DIGI POT Click return value data. More... | |
Functions | |
void | digipot_cfg_setup (digipot_cfg_t *cfg) |
DIGI POT configuration object setup function. | |
err_t | digipot_init (digipot_t *ctx, digipot_cfg_t *cfg) |
DIGI POT initialization function. | |
void | digipot_generic_transfer (digipot_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
void | digipot_set_wiper_positions (digipot_t *ctx, uint8_t wiper_pos) |
Set wiper position. | |
float | digipot_convert_output (uint16_t adc_val, float v_ref) |
Convert ADC value to volatage. | |
This file contains API for DIGI POT Click Driver.