dac 2.0.0.0
dac.h File Reference

This file contains API for DAC Click driver. More...

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

Go to the source code of this file.

Data Structures

struct  dac_t
 Click ctx object definition. More...
 
struct  dac_cfg_t
 Click configuration structure definition. More...
 

Macros

#define DAC_MAP_MIKROBUS(cfg, mikrobus)
 
#define DAC_RETVAL   uint8_t
 
#define DAC_OK   0x00
 
#define DAC_INIT_ERROR   0xFF
 
#define DAC_APPLY_SETTINGS   0x30
 
#define DAC_4_BIT_DATA   0x0F
 
#define DAC_8_BIT_DATA   0xFF
 
#define DAC_PERCENTAGE   100
 
#define DAC_ONE_STEP_VAL   819
 
#define DAC_CLAC_VAL   20
 
#define DAC_CALIB_VAL_1   220
 
#define DAC_CALIB_VAL_2   273
 
#define DAC_RESOLUTION   4096
 
#define DAC_STEP_VALUE   1000
 

Functions

void dac_cfg_setup (dac_cfg_t *cfg)
 Config Object Initialization function.
 
DAC_RETVAL dac_init (dac_t *ctx, dac_cfg_t *cfg)
 Initialization function.
 
void dac_set_voltage (dac_t *ctx, uint16_t v_out)
 Set voltage function.
 
void dac_set_voltage_pct (dac_t *ctx, uint8_t v_out_pct)
 Function write procentage value.
 

Detailed Description

This file contains API for DAC Click driver.