hztov 2.0.0.0
|
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. | |
void hztov_cfg_setup | ( | hztov_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
hztov_data_t hztov_generic_read | ( | hztov_t * | ctx | ) |
Generic read function.
ctx | Click object. |
@description This function reads ADC data.
HZTOV_RETVAL hztov_init | ( | hztov_t * | ctx, |
hztov_cfg_t * | cfg ) |
Initialization function.
hztov | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void hztov_pwm_start | ( | hztov_t * | ctx | ) |
Start PWM module.
ctx | Click object. |
@description This function starts PWM module.
void hztov_pwm_stop | ( | hztov_t * | ctx | ) |
Stop PWM module.
ctx | Click object. |
@description This function stops PWM module.
float hztov_read_voltage | ( | hztov_t * | ctx | ) |
Read voltage function.
ctx | Click object. |
@description This function reads ADC data and converts it to voltage.
void hztov_set_duty_cycle | ( | hztov_t * | ctx, |
float | duty_cycle ) |
Generic sets PWM duty cycle.
ctx | Click object. |
duty_cycle | Duty cycle. |
@description This function sets the PWM duty cycle.
void hztov_set_enable | ( | hztov_t * | ctx, |
uint8_t | state ) |
Set enable pin state.
ctx | Click object. |
state | Enable/Disable state. |
@description This function sets the state of EN pin.
void hztov_set_input_frequency | ( | hztov_t * | ctx, |
uint16_t | freq ) |
Changing the output voltage function.
ctx | Click object. |
freq | Input frequency in Hz, ranges from 1000 to 10000 Hz |
@description This function sets the PWM frequency to required value, changing the output voltage.