digivref 2.0.0.0
Public function

Functions

void digivref_cfg_setup (digivref_cfg_t *cfg)
 Config Object Initialization function.
 
DIGIVREF_RETVAL digivref_init (digivref_t *ctx, digivref_cfg_t *cfg)
 Initialization function.
 
void digivref_generic_transfer (digivref_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function.
 
void digivref_set_output_voltage (digivref_t *ctx, uint8_t v_ref)
 Function for set reference output voltage.
 

Detailed Description

Function Documentation

◆ digivref_cfg_setup()

void digivref_cfg_setup ( digivref_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ digivref_generic_transfer()

void digivref_generic_transfer ( digivref_t * ctx,
uint8_t * wr_buf,
uint16_t wr_len,
uint8_t * rd_buf,
uint16_t rd_len )

Generic transfer function.

Parameters
ctxClick object.
wr_bufWrite data buffer
wr_lenNumber of byte in write data buffer
rd_bufRead data buffer
rd_lenNumber of byte in read data buffer

@description Generic SPI transfer, for sending and receiving packages

◆ digivref_init()

DIGIVREF_RETVAL digivref_init ( digivref_t * ctx,
digivref_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ digivref_set_output_voltage()

void digivref_set_output_voltage ( digivref_t * ctx,
uint8_t v_ref )

Function for set reference output voltage.

Parameters
ctxClick object.
v_refReference output voltage( 4096mV - 3070mV - 2047mV - 1030mV ).

@description This function sets reference output voltage.