digipot2
2.0.0.0
|
This file contains API for DIGI POT 2 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 | digipot2_t |
Click ctx object definition. More... | |
struct | digipot2_cfg_t |
Click configuration structure definition. More... | |
Macros | |
#define | DIGIPOT2_MAP_MIKROBUS(cfg, mikrobus) |
#define | DIGIPOT2_RETVAL uint8_t |
#define | DIGIPOT2_OK 0x00 |
#define | DIGIPOT2_INIT_ERROR 0xFF |
#define | DIGIPOT2_VREF_3V3 3.3 |
#define | DIGIPOT2_VREF_5V 5.0 |
Functions | |
void | digipot2_cfg_setup (digipot2_cfg_t *cfg) |
Config Object Initialization function. More... | |
DIGIPOT2_RETVAL | digipot2_init (digipot2_t *ctx, digipot2_cfg_t *cfg) |
Initialization function. More... | |
void | digipot2_generic_transfer (digipot2_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. More... | |
void | digipot2_write_byte (digipot2_t *ctx, uint8_t command, uint8_t write_data) |
Generic write 8-bit data function. More... | |
void | digipot2_set_wiper_positions (digipot2_t *ctx, uint8_t wiper_positions) |
Set 8-bit wiper positions. More... | |
float | digipot2_convert_output (digipot2_t *ctx, uint16_t value_adc, float v_ref) |
Convert ADC value to volatage. More... | |
This file contains API for DIGI POT 2 Click driver.