vtohz3 2.0.0.0
vtohz3.h File Reference

This file contains API for V to Hz 3 Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"
#include "spi_specifics.h"
#include "drv_analog_in.h"

Go to the source code of this file.

Data Structures

struct  vtohz3_t
 V to Hz 3 Click context object. More...
 
struct  vtohz3_cfg_t
 V to Hz 3 Click configuration object. More...
 

Macros

#define VTOHZ3_MAXIMAL_IN_FREQUENCY   1000000
 V to Hz 3 AD7740 input frequency range.
 
#define VTOHZ3_MINIMAL_IN_FREQUENCY   32000
 
#define VTOHZ3_DEFAULT_IN_FREQUENCY   100000
 
#define VTOHZ3_VREF_3V3   3.3
 V to Hz 3 voltage reference selection.
 
#define VTOHZ3_VREF_5V   5.0
 
#define VTOHZ3_VREF_INTERNAL_2V5   2.5
 
#define VTOHZ3_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE
 Data sample selection.
 
#define VTOHZ3_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE
 
#define VTOHZ3_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  vtohz3_return_value_t { VTOHZ3_OK = 0 , VTOHZ3_ERROR = -1 }
 V to Hz 3 Click return value data. More...
 

Functions

void vtohz3_cfg_setup (vtohz3_cfg_t *cfg)
 V to Hz 3 configuration object setup function.
 
err_t vtohz3_init (vtohz3_t *ctx, vtohz3_cfg_t *cfg)
 V to Hz 3 initialization function.
 
err_t vtohz3_set_input_frequency (vtohz3_t *ctx, uint32_t freq)
 V to Hz 3 set input frequency function.
 
err_t vtohz3_disable_input_frequency (vtohz3_t *ctx)
 V to Hz 3 disable input frequency function.
 
void vtohz3_set_buf_pin (vtohz3_t *ctx, uint8_t state)
 V to Hz 3 set buf pin function.
 
uint8_t vtohz3_get_fout_pin (vtohz3_t *ctx)
 V to Hz 3 get fout pin function.
 
err_t vtohz3_read_an_pin_value (vtohz3_t *ctx, uint16_t *data_out)
 V to Hz 3 read AN pin value function.
 
err_t vtohz3_read_an_pin_voltage (vtohz3_t *ctx, float *data_out)
 V to Hz 3 read AN pin voltage level function.
 
uint32_t vtohz3_get_frequency (vtohz3_t *ctx, float voltage, float vref_in)
 V to Hz 3 get frequency function.
 

Detailed Description

This file contains API for V to Hz 3 Click Driver.

Enumeration Type Documentation

◆ vtohz3_return_value_t

V to Hz 3 Click return value data.

Predefined enum values for driver return values.

Enumerator
VTOHZ3_OK 
VTOHZ3_ERROR