adc2  2.0.0.0
Functions
Public function

Functions

void adc2_cfg_setup (adc2_cfg_t *cfg)
 Config Object Initialization function. More...
 
ADC2_RETVAL adc2_init (adc2_t *ctx, adc2_cfg_t *cfg)
 Initialization function. More...
 
void adc2_generic_transfer (adc2_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function. More...
 
uint32_t adc2_read_4bytes (adc2_t *ctx)
 Data read function. More...
 
uint32_t adc2_adc_value_read (adc2_t *ctx)
 Read ADC value function. More...
 
uint8_t adc2_check_over_low (adc2_t *ctx)
 Check over low bit function. More...
 
uint8_t adc2_check_over_high (adc2_t *ctx)
 Check over high bit function. More...
 

Detailed Description

Function Documentation

◆ adc2_adc_value_read()

uint32_t adc2_adc_value_read ( adc2_t ctx)

Read ADC value function.

Parameters
ctxClick object.
Returns
result 22-bit data that represents readings from ADC convertor

Function is used to read specific data from ADC convertor.

◆ adc2_cfg_setup()

void adc2_cfg_setup ( adc2_cfg_t cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ adc2_check_over_high()

uint8_t adc2_check_over_high ( adc2_t ctx)

Check over high bit function.

Parameters
ctxClick object.
Returns
result 1-bit that represents over high bit

Function is used to check overflow high state.

◆ adc2_check_over_low()

uint8_t adc2_check_over_low ( adc2_t ctx)

Check over low bit function.

Parameters
ctxClick object.
Returns
result 1-bit that represents over low bit

Function is used to check overflow low state.

◆ adc2_generic_transfer()

void adc2_generic_transfer ( adc2_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

Generic SPI transfer, for sending and receiving packages

◆ adc2_init()

ADC2_RETVAL adc2_init ( adc2_t ctx,
adc2_cfg_t cfg 
)

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ adc2_read_4bytes()

uint32_t adc2_read_4bytes ( adc2_t ctx)

Data read function.

Parameters
ctxClick object.
Returns
result 24-bit value that represents readings from ADC convertor

Function is used to read data from ADC convertor.