mikroSDK Reference Manual
analog_in_config_t Struct Reference

Analog input driver configuration structure. More...

Data Fields

pin_name_t input_pin
 
analog_in_resolution_t resolution
 
analog_in_vref_t vref_input
 
float vref_value
 

Detailed Description

The context structure for storing driver configuration. User shall define the values stored within.

Warning
The following example describes how to fill a analog_in_config_t structure. Take into consideration that different hardware might not have the same possibilities. Make sure to accommodate resolution and vref based on your hardware specifics.

Example

// Analog input driver configuration structure
analog_in_config_t analog_in_cfg;
analog_in_cfg.input_pin = MIKROBUS_1_AN;

Field Documentation

◆ input_pin

pin_name_t analog_in_config_t::input_pin

Analog input pin.

◆ resolution

analog_in_resolution_t analog_in_config_t::resolution

Resolution.

◆ vref_input

analog_in_vref_t analog_in_config_t::vref_input

Voltage reference input.

◆ vref_value

float analog_in_config_t::vref_value

Voltage reference value.

ANALOG_IN_RESOLUTION_12_BIT
Definition: drv_analog_in.h:81
analog_in_config_t
Analog input driver configuration structure.
Definition: drv_analog_in.h:106
analog_in_config_t::resolution
analog_in_resolution_t resolution
Definition: drv_analog_in.h:109
ANALOG_IN_VREF_EXTERNAL
Definition: drv_analog_in.h:68
analog_in_config_t::vref_input
analog_in_vref_t vref_input
Definition: drv_analog_in.h:110
analog_in_config_t::input_pin
pin_name_t input_pin
Definition: drv_analog_in.h:108