mikroSDK Reference Manual
drv_analog_in.h File Reference

Go to the source code of this file.

Data Structures

struct  analog_in_config_t
 Analog input driver configuration structure. More...
 
struct  analog_in_t
 Analog input driver context structure, consisted of the following fields : More...
 

Enumerations

enum  analog_in_err_t
 
enum  analog_in_vref_t
 
enum  analog_in_resolution_t
 

Functions

void analog_in_configure_default (analog_in_config_t *config)
 Configure ADC configuration structure. More...
 
err_t analog_in_open (analog_in_t *obj, analog_in_config_t *config)
 Open the ADC driver object on selected pin. More...
 
err_t analog_in_set_resolution (analog_in_t *obj, analog_in_resolution_t resolution)
 Set ADC driver sample resolution. More...
 
err_t analog_in_set_vref_input (analog_in_t *obj, analog_in_vref_t vref)
 Set ADC driver voltage reference source. More...
 
err_t analog_in_set_vref_value (analog_in_t *obj, float vref_value)
 Set ADC driver voltage reference value. More...
 
err_t analog_in_read (analog_in_t *obj, uint16_t *readDatabuf)
 Read analog value from pin. More...
 
err_t analog_in_read_voltage (analog_in_t *obj, float *readDatabuf)
 Read analog voltage value from pin. More...
 
err_t analog_in_close (analog_in_t *obj)
 Close ADC driver context object. More...
 

Enumeration Type Documentation

◆ analog_in_err_t

Return values.

Enumerator
ADC_SUCCESS 

Success.

ADC_ERROR 

Error.

◆ analog_in_vref_t

Analog input driver reference voltage enum.

Enumerator
ANALOG_IN_VREF_EXTERNAL 

External reference.

ANALOG_IN_VREF_INTERNAL 

Internal reference.

◆ analog_in_resolution_t

Analog input driver resolution enum.

Enumerator
ANALOG_IN_RESOLUTION_NOT_SET 

Resolution not set.

ANALOG_IN_RESOLUTION_6_BIT 

6 bit resolution.

ANALOG_IN_RESOLUTION_8_BIT 

8 bit resolution.

ANALOG_IN_RESOLUTION_10_BIT 

10 bit resolution.

ANALOG_IN_RESOLUTION_12_BIT 

12 bit resolution.

ANALOG_IN_RESOLUTION_14_BIT 

14 bit resolution.

ANALOG_IN_RESOLUTION_16_BIT 

16 bit resolution.

ANALOG_IN_RESOLUTION_DEFAULT 

Default resolution per architecture.