vctmonitor 2.0.0.0
VCT Monitor Click Driver

API for configuring and manipulating VCT Monitor Click driver. More...

Topics

 VCT Monitor Registers List
 List of registers of VCT Monitor Click driver.
 
 VCT Monitor Registers Settings
 Settings for registers of VCT Monitor Click driver.
 
 VCT Monitor MikroBUS Map
 MikroBUS pin mapping of VCT Monitor Click driver.
 

Functions

void vctmonitor_cfg_setup (vctmonitor_cfg_t *cfg)
 VCT Monitor configuration object setup function.
 
err_t vctmonitor_init (vctmonitor_t *ctx, vctmonitor_cfg_t *cfg)
 VCT Monitor initialization function.
 
err_t vctmonitor_default_cfg (vctmonitor_t *ctx)
 VCT Monitor default configuration function.
 
err_t vctmonitor_generic_write (vctmonitor_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len)
 VCT Monitor I2C writing function.
 
err_t vctmonitor_generic_read (vctmonitor_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len)
 VCT Monitor I2C reading function.
 
uint8_t vctmonitor_get_status (vctmonitor_t *ctx)
 Gets status value.
 
void vctmonitor_configuration (vctmonitor_t *ctx, uint8_t cfg)
 Configuration function.
 
float vctmonitor_read_temperature (vctmonitor_t *ctx)
 Get temperature function.
 
float vctmonitor_read_voltage_differential (vctmonitor_t *ctx)
 Differential voltage function.
 
float vctmonitor_read_voltage_single (vctmonitor_t *ctx, uint8_t channel)
 Single voltage function.
 
float vctmonitor_read_current (vctmonitor_t *ctx)
 Current function.
 

Detailed Description

API for configuring and manipulating VCT Monitor Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ vctmonitor_cfg_setup()

void vctmonitor_cfg_setup ( vctmonitor_cfg_t * cfg)

VCT Monitor configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See vctmonitor_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ vctmonitor_configuration()

void vctmonitor_configuration ( vctmonitor_t * ctx,
uint8_t cfg )

Configuration function.

This function is used for configuration paramethers of VCT Monitor click board.

Parameters
[in]ctx: Click context object. See vctmonitor_t object definition for detailed explanation.
[in]cfg: Config data
Returns
Nothing.

◆ vctmonitor_default_cfg()

err_t vctmonitor_default_cfg ( vctmonitor_t * ctx)

VCT Monitor default configuration function.

This function executes a default configuration of VCT Monitor click board.

Parameters
[in]ctx: Click context object. See vctmonitor_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ vctmonitor_generic_read()

err_t vctmonitor_generic_read ( vctmonitor_t * ctx,
uint8_t reg,
uint8_t * rx_buf,
uint8_t rx_len )

VCT Monitor I2C reading function.

This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See vctmonitor_t object definition for detailed explanation.
[in]reg: Start register address.
[out]rx_buf: Output read data.
[in]rx_len: Number of bytes to be read.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ vctmonitor_generic_write()

err_t vctmonitor_generic_write ( vctmonitor_t * ctx,
uint8_t reg,
uint8_t * tx_buf,
uint8_t tx_len )

VCT Monitor I2C writing function.

This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See vctmonitor_t object definition for detailed explanation.
[in]reg: Start register address.
[in]tx_buf: Data to be written.
[in]tx_len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ vctmonitor_get_status()

uint8_t vctmonitor_get_status ( vctmonitor_t * ctx)

Gets status value.

This function reads status register value by using I2C serial interface.

Parameters
[in]ctx: Click context object. See vctmonitor_t object definition for detailed explanation.
Returns
The status value read from the register

◆ vctmonitor_init()

err_t vctmonitor_init ( vctmonitor_t * ctx,
vctmonitor_cfg_t * cfg )

VCT Monitor initialization function.

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

Parameters
[out]ctx: Click context object. See vctmonitor_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See vctmonitor_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ vctmonitor_read_current()

float vctmonitor_read_current ( vctmonitor_t * ctx)

Current function.

This function reads current value by using I2C serial interface.

Parameters
[in]ctx: Click context object. See vctmonitor_t object definition for detailed explanation.
Returns
Current value in mA

◆ vctmonitor_read_temperature()

float vctmonitor_read_temperature ( vctmonitor_t * ctx)

Get temperature function.

This function reads temperature value by using I2C serial interface.

Parameters
[in]ctx: Click context object. See vctmonitor_t object definition for detailed explanation.
Returns
External temperature value in C

◆ vctmonitor_read_voltage_differential()

float vctmonitor_read_voltage_differential ( vctmonitor_t * ctx)

Differential voltage function.

This function reads differential voltage value by using I2C serial interface.

Parameters
[in]ctx: Click context object. See vctmonitor_t object definition for detailed explanation.
Returns
Differential voltage on the terminal in mV
Note
Differential voltages can have input values in the range of �0.300V to 0.300V.

◆ vctmonitor_read_voltage_single()

float vctmonitor_read_voltage_single ( vctmonitor_t * ctx,
uint8_t channel )

Single voltage function.

This function reads single voltage value by using I2C serial interface.

Parameters
[in]ctx: Click context object. See vctmonitor_t object definition for detailed explanation.
[in]channel: Channel V1 or V2 for a single measurement
Returns
Single voltage on the channel in mV
Note
Single-ended voltages are limited to positive values in the range 0V to 3.5V.