hztov 2.0.0.0
hztov.h File Reference

This file contains API for HZ to V Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_pwm.h"
#include "drv_analog_in.h"

Go to the source code of this file.

Data Structures

struct  hztov_t
 Click ctx object definition. More...
 
struct  hztov_cfg_t
 Click configuration structure definition. More...
 

Macros

#define HZTOV_MAP_MIKROBUS(cfg, mikrobus)
 
#define HZTOV_RETVAL   uint8_t
 
#define HZTOV_OK   0x00
 
#define HZTOV_INIT_ERROR   0xFF
 
#define HZTOV_DEF_FREQ   5000
 
#define HZTOV_ENABLE   1
 
#define HZTOV_DISABLE   0
 
#define HZTOV_MAX_FREQ   10000
 
#define HZTOV_MIN_FREQ   1000
 

Typedefs

typedef uint16_t hztov_data_t
 Analog data type.
 

Functions

void hztov_cfg_setup (hztov_cfg_t *cfg)
 Config Object Initialization function.
 
HZTOV_RETVAL hztov_init (hztov_t *ctx, hztov_cfg_t *cfg)
 Initialization function.
 
hztov_data_t hztov_generic_read (hztov_t *ctx)
 Generic read function.
 
float hztov_read_voltage (hztov_t *ctx)
 Read voltage function.
 
void hztov_set_enable (hztov_t *ctx, uint8_t state)
 Set enable pin state.
 
void hztov_set_duty_cycle (hztov_t *ctx, float duty_cycle)
 Generic sets PWM duty cycle.
 
void hztov_pwm_stop (hztov_t *ctx)
 Stop PWM module.
 
void hztov_pwm_start (hztov_t *ctx)
 Start PWM module.
 
void hztov_set_input_frequency (hztov_t *ctx, uint16_t freq)
 Changing the output voltage function.
 

Detailed Description

This file contains API for HZ to V Click driver.