uvc 2.0.0.0
Public function

Functions

void uvc_cfg_setup (uvc_cfg_t *cfg)
 Config Object Initialization function.
 
UVC_RETVAL uvc_init (uvc_t *ctx, uvc_cfg_t *cfg)
 Initialization function.
 
void uvc_generic_write (uvc_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void uvc_generic_read (uvc_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
uint16_t uvc_read_raw_data (uvc_t *ctx)
 Read 12bit raw data.
 
float uvc_get_voltage (uvc_t *ctx)
 Calculate voltage.
 
float uvc_calculate_power (float voltage)
 Calculate power.
 

Detailed Description

Function Documentation

◆ uvc_calculate_power()

float uvc_calculate_power ( float voltage)

Calculate power.

Parameters
ctxClick object.
voltageVoltage on AN pin
Returns
power [ 0 - 14.1mW/cm2 ]

@description This function calculate power from voltage.

◆ uvc_cfg_setup()

void uvc_cfg_setup ( uvc_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.

◆ uvc_generic_read()

void uvc_generic_read ( uvc_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf
lenNumber of the bytes to be read

@description This function reads data from the desired register.

◆ uvc_generic_write()

void uvc_generic_write ( uvc_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ uvc_get_voltage()

float uvc_get_voltage ( uvc_t * ctx)

Calculate voltage.

Parameters
ctxClick object.
Returns
Voltage on AN pin

@description This function calculate voltage from raw data.

◆ uvc_init()

UVC_RETVAL uvc_init ( uvc_t * ctx,
uvc_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ uvc_read_raw_data()

uint16_t uvc_read_raw_data ( uvc_t * ctx)

Read 12bit raw data.

Parameters
ctxClick object.
Returns
12bit data

@description This function reads 12bit raw data.