clockgen 2.0.0.0
Public function

Functions

void clockgen_cfg_setup (clockgen_cfg_t *cfg)
 Config Object Initialization function.
 
CLOCKGEN_RETVAL clockgen_init (clockgen_t *ctx, clockgen_cfg_t *cfg)
 Initialization function.
 
void clockgen_default_cfg (clockgen_t *ctx)
 Click Default Configuration function.
 
void clockgen_generic_write (clockgen_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void clockgen_generic_read (clockgen_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void clockgen_enable_clk (clockgen_t *ctx, uint8_t clk_num)
 Function enabling specific clock.
 
void clockgen_ctrl_clk (clockgen_t *ctx, uint8_t clk_num, uint8_t ctrl_data)
 Function enabling specific clock.
 
void clockgen_set_disable_state (clockgen_t *ctx, uint8_t clk_num, uint8_t disable_state)
 Function for setting clock disabling state.
 
void clockgen_set_clk_pll (clockgen_t *ctx, uint8_t clk_num, uint8_t pll_sel)
 Function for setting clock pll-s.
 
void clockgen_set_params (clockgen_t *ctx, uint8_t clk_pll_num, clockgen_params_t *param_group)
 Function for setting clock pll-s.
 
void clockgen_get_params (clockgen_t *ctx, uint8_t clk_pll_num, clockgen_params_t *param_group)
 Function for getting clock pll-s.
 
void clockgen_set_frequency (clockgen_t *ctx, uint8_t clk_num, uint8_t pll_num, uint32_t freq)
 Function for setting clock frequency on specific clock.
 
void clockgen_setup_pll (clockgen_t *ctx, uint8_t pll, uint8_t mult, uint32_t num)
 Function for setting pll.
 
void clockgen_setup_multisyinth (clockgen_t *ctx, uint8_t clk_num, uint32_t divider, uint32_t num)
 Function for setting clock divider.
 

Detailed Description

Function Documentation

◆ clockgen_cfg_setup()

void clockgen_cfg_setup ( clockgen_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.

◆ clockgen_ctrl_clk()

void clockgen_ctrl_clk ( clockgen_t * ctx,
uint8_t clk_num,
uint8_t ctrl_data )

Function enabling specific clock.

Parameters
ctxClick object.
clk_numClock number.
ctrl_dataData to set on clk_num.

@description This function enable clock with specific clock number.

◆ clockgen_default_cfg()

void clockgen_default_cfg ( clockgen_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for ClockGen click.

◆ clockgen_enable_clk()

void clockgen_enable_clk ( clockgen_t * ctx,
uint8_t clk_num )

Function enabling specific clock.

Parameters
ctxClick object.
clk_numClock number.

@description This function enable specific clock.

◆ clockgen_generic_read()

void clockgen_generic_read ( clockgen_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.

◆ clockgen_generic_write()

void clockgen_generic_write ( clockgen_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.

◆ clockgen_get_params()

void clockgen_get_params ( clockgen_t * ctx,
uint8_t clk_pll_num,
clockgen_params_t * param_group )

Function for getting clock pll-s.

Parameters
ctxClick object.
clk_pll_numClock or pll.
param_groupStructure for getting parameters.

@description This function gets clock pll.

◆ clockgen_init()

CLOCKGEN_RETVAL clockgen_init ( clockgen_t * ctx,
clockgen_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ clockgen_set_clk_pll()

void clockgen_set_clk_pll ( clockgen_t * ctx,
uint8_t clk_num,
uint8_t pll_sel )

Function for setting clock pll-s.

Parameters
ctxClick object.
clk_numClock number.
pll_selPll.

@description This function sets clock pll.

◆ clockgen_set_disable_state()

void clockgen_set_disable_state ( clockgen_t * ctx,
uint8_t clk_num,
uint8_t disable_state )

Function for setting clock disabling state.

Parameters
ctxClick object.
clk_numClock number.
disable_stateDisable state of the clock.

@description This function disable clock state.

◆ clockgen_set_frequency()

void clockgen_set_frequency ( clockgen_t * ctx,
uint8_t clk_num,
uint8_t pll_num,
uint32_t freq )

Function for setting clock frequency on specific clock.

Parameters
ctxClick object.
clk_numClock number.
pll_numPll number.
freqFrequency to be set in MHz.

@description This function sets clock frequency on specific clock.

◆ clockgen_set_params()

void clockgen_set_params ( clockgen_t * ctx,
uint8_t clk_pll_num,
clockgen_params_t * param_group )

Function for setting clock pll-s.

Parameters
ctxClick object.
clk_pll_numClock or pll.
param_groupStructure for setting parameters.

@description This function sets clock pll with parameter structure.

◆ clockgen_setup_multisyinth()

void clockgen_setup_multisyinth ( clockgen_t * ctx,
uint8_t clk_num,
uint32_t divider,
uint32_t num )

Function for setting clock divider.

Parameters
ctxClick object.
clk_numClock number.
dividerDivider value.
numNominator value.

@description This function sets clock divider

Note
Parameters
denomDenominator value.
factorR divider.

◆ clockgen_setup_pll()

void clockgen_setup_pll ( clockgen_t * ctx,
uint8_t pll,
uint8_t mult,
uint32_t num )

Function for setting pll.

Parameters
ctxClick object.
clk_numClock number.
multMultiplier value.
numNominator value.

@description This function sets pll.

Note
Parameters
denomDenominator value.