clockgen  2.0.0.0
Functions
Public function

Functions

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

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.