hztov 2.0.0.0
Public function

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

Function Documentation

◆ hztov_cfg_setup()

void hztov_cfg_setup ( hztov_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ hztov_generic_read()

hztov_data_t hztov_generic_read ( hztov_t * ctx)

Generic read function.

Parameters
ctxClick object.
Returns
ADC data

@description This function reads ADC data.

◆ hztov_init()

HZTOV_RETVAL hztov_init ( hztov_t * ctx,
hztov_cfg_t * cfg )

Initialization function.

Parameters
hztovClick object.
cfgClick configuration structure.

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

◆ hztov_pwm_start()

void hztov_pwm_start ( hztov_t * ctx)

Start PWM module.

Parameters
ctxClick object.

@description This function starts PWM module.

◆ hztov_pwm_stop()

void hztov_pwm_stop ( hztov_t * ctx)

Stop PWM module.

Parameters
ctxClick object.

@description This function stops PWM module.

◆ hztov_read_voltage()

float hztov_read_voltage ( hztov_t * ctx)

Read voltage function.

Parameters
ctxClick object.
Returns
Voltage

@description This function reads ADC data and converts it to voltage.

◆ hztov_set_duty_cycle()

void hztov_set_duty_cycle ( hztov_t * ctx,
float duty_cycle )

Generic sets PWM duty cycle.

Parameters
ctxClick object.
duty_cycleDuty cycle.

@description This function sets the PWM duty cycle.

◆ hztov_set_enable()

void hztov_set_enable ( hztov_t * ctx,
uint8_t state )

Set enable pin state.

Parameters
ctxClick object.
stateEnable/Disable state.

@description This function sets the state of EN pin.

◆ hztov_set_input_frequency()

void hztov_set_input_frequency ( hztov_t * ctx,
uint16_t freq )

Changing the output voltage function.

Parameters
ctxClick object.
freqInput frequency in Hz, ranges from 1000 to 10000 Hz

@description This function sets the PWM frequency to required value, changing the output voltage.