vreg 2.0.0.0
|
Functions | |
void | vreg_cfg_setup (vreg_cfg_t *cfg) |
Config Object Initialization function. | |
VREG_RETVAL | vreg_init (vreg_t *ctx, vreg_cfg_t *cfg) |
Initialization function. | |
void | vreg_generic_transfer (vreg_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
uint16_t | vreg_get_adc (vreg_t *ctx, uint8_t channel) |
Get ADC value function. | |
void | vreg_set_out_voltage (vreg_t *ctx, uint16_t value_dac) |
Set output voltage function. | |
void | vreg_set_output_voltage_procentage (vreg_t *ctx, uint8_t value_dac_pct) |
Set output voltage procentage function. | |
void | vreg_start_measuring (vreg_t *ctx) |
Start the measuring function. | |
void | vreg_stop_measuring (vreg_t *ctx) |
Stop the measuring function. | |
void vreg_cfg_setup | ( | vreg_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void vreg_generic_transfer | ( | vreg_t * | ctx, |
uint8_t * | wr_buf, | ||
uint16_t | wr_len, | ||
uint8_t * | rd_buf, | ||
uint16_t | rd_len ) |
Generic transfer function.
ctx | Click object. |
wr_buf | Write data buffer |
wr_len | Number of byte in write data buffer |
rd_buf | Read data buffer |
rd_len | Number of byte in read data buffer |
@description Generic SPI transfer, for sending and receiving packages
uint16_t vreg_get_adc | ( | vreg_t * | ctx, |
uint8_t | channel ) |
Get ADC value function.
ctx | Click object. |
channel | designated channel |
@description This function reads 2-bit ADC value from designated channel of MCP3204 4-Channel 12-Bit A/D Converters on VREG click board.
VREG_RETVAL vreg_init | ( | vreg_t * | ctx, |
vreg_cfg_t * | cfg ) |
Initialization function.
vreg | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void vreg_set_out_voltage | ( | vreg_t * | ctx, |
uint16_t | value_dac ) |
Set output voltage function.
ctx | Click object. |
value_dac | 12-bit DAC value |
@description This function set DAC increments 12-bit data ( 0..4095 ) --> output voltage ( 0..Vref [mV] ) of 12-Bit Voltage Output Digital-to-Analog Converter on VREG click board.
void vreg_set_output_voltage_procentage | ( | vreg_t * | ctx, |
uint8_t | value_dac_pct ) |
Set output voltage procentage function.
ctx | Click object. |
value_dac_pct | 8-bit data procentage value ( 0..100 [%] ) |
@description This function set DAC increments procentage ( 0..100 [%] ) --> output voltage ( 0..Vref [mV] ) of 12-Bit Voltage Output Digital-to-Analog Converter on VREG click board.
void vreg_start_measuring | ( | vreg_t * | ctx | ) |
Start the measuring function.
@description This function start the measuring by set state of PWM pin of VREG click board.
void vreg_stop_measuring | ( | vreg_t * | ctx | ) |
Stop the measuring function.
ctx | Click object. |
@description This function Function stop the measuring by clear state of PWM pin of VREG click board.