rng 2.0.0.0
Public function

Functions

void rng_cfg_setup (rng_cfg_t *cfg)
 Config Object Initialization function.
 
RNG_RETVAL rng_init (rng_t *ctx, rng_cfg_t *cfg)
 Initialization function.
 
void rng_default_cfg (rng_t *ctx)
 Click Default Configuration function.
 
void rng_write_function (rng_t *ctx, uint8_t reg, uint16_t reg_data)
 Write function.
 
uint16_t rng_read_function (rng_t *ctx, uint8_t reg)
 Read function.
 
void rng_reset_device (rng_t *ctx)
 Function used for reset device.
 
void rng_set_config (rng_t *ctx, uint16_t conf_data)
 Function used for set configuration.
 
void rng_set_vref (rng_t *ctx, uint16_t vref_mv)
 Function used for set vref in millivolts.
 
float rng_get_voltage (rng_t *ctx)
 Function used for get voltage.
 
void rng_set_threshold (rng_t *ctx, uint8_t thresh_reg, uint16_t thresh_data)
 Function used for set threshold values.
 

Detailed Description

Function Documentation

◆ rng_cfg_setup()

void rng_cfg_setup ( rng_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.

◆ rng_default_cfg()

void rng_default_cfg ( rng_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Rng click.

◆ rng_get_voltage()

float rng_get_voltage ( rng_t * ctx)

Function used for get voltage.

Parameters
ctxClick object.
Returns
Voltage in millivolts.

@description This function gets voltage in millivolts.

◆ rng_init()

RNG_RETVAL rng_init ( rng_t * ctx,
rng_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ rng_read_function()

uint16_t rng_read_function ( rng_t * ctx,
uint8_t reg )

Read function.

Parameters
ctxClick object.
regRegister address.
Returns
read 16 byte data

@description This function reads data from the desired register.

◆ rng_reset_device()

void rng_reset_device ( rng_t * ctx)

Function used for reset device.

Parameters
ctxClick object.

@description This function resets device.

◆ rng_set_config()

void rng_set_config ( rng_t * ctx,
uint16_t conf_data )

Function used for set configuration.

Parameters
ctxClick object.
conf_dataConfiguration data.

@description This function sets configuration.

◆ rng_set_threshold()

void rng_set_threshold ( rng_t * ctx,
uint8_t thresh_reg,
uint16_t thresh_data )

Function used for set threshold values.

Parameters
ctxClick object.
thresh_regRegister adress.
thresh_dataData to be write.

@description Used by the comparator stored in two 16-bit registers.

◆ rng_set_vref()

void rng_set_vref ( rng_t * ctx,
uint16_t vref_mv )

Function used for set vref in millivolts.

Parameters
ctxClick object.
vref_mvSets reference voltage in millivolts.

@description This function sets desired vref.

◆ rng_write_function()

void rng_write_function ( rng_t * ctx,
uint8_t reg,
uint16_t reg_data )

Write function.

Parameters
ctxClick object.
regRegister address.
reg_dataData to be written.

@description This function writes data to the desired register.