clockgen 2.0.0.0
|
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. | |
void clockgen_cfg_setup | ( | clockgen_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void clockgen_ctrl_clk | ( | clockgen_t * | ctx, |
uint8_t | clk_num, | ||
uint8_t | ctrl_data ) |
Function enabling specific clock.
ctx | Click object. |
clk_num | Clock number. |
ctrl_data | Data to set on clk_num. |
@description This function enable clock with specific clock number.
void clockgen_default_cfg | ( | clockgen_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for ClockGen click.
void clockgen_enable_clk | ( | clockgen_t * | ctx, |
uint8_t | clk_num ) |
Function enabling specific clock.
ctx | Click object. |
clk_num | Clock number. |
@description This function enable specific clock.
void clockgen_generic_read | ( | clockgen_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf. |
len | Number of the bytes to be read. |
@description This function reads data from the desired register.
void clockgen_generic_write | ( | clockgen_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
void clockgen_get_params | ( | clockgen_t * | ctx, |
uint8_t | clk_pll_num, | ||
clockgen_params_t * | param_group ) |
Function for getting clock pll-s.
ctx | Click object. |
clk_pll_num | Clock or pll. |
param_group | Structure for getting parameters. |
@description This function gets clock pll.
CLOCKGEN_RETVAL clockgen_init | ( | clockgen_t * | ctx, |
clockgen_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void clockgen_set_clk_pll | ( | clockgen_t * | ctx, |
uint8_t | clk_num, | ||
uint8_t | pll_sel ) |
Function for setting clock pll-s.
ctx | Click object. |
clk_num | Clock number. |
pll_sel | Pll. |
@description This function sets clock pll.
void clockgen_set_disable_state | ( | clockgen_t * | ctx, |
uint8_t | clk_num, | ||
uint8_t | disable_state ) |
Function for setting clock disabling state.
ctx | Click object. |
clk_num | Clock number. |
disable_state | Disable state of the clock. |
@description This function disable clock state.
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.
ctx | Click object. |
clk_num | Clock number. |
pll_num | Pll number. |
freq | Frequency to be set in MHz. |
@description This function sets clock frequency on specific clock.
void clockgen_set_params | ( | clockgen_t * | ctx, |
uint8_t | clk_pll_num, | ||
clockgen_params_t * | param_group ) |
Function for setting clock pll-s.
ctx | Click object. |
clk_pll_num | Clock or pll. |
param_group | Structure for setting parameters. |
@description This function sets clock pll with parameter structure.
void clockgen_setup_multisyinth | ( | clockgen_t * | ctx, |
uint8_t | clk_num, | ||
uint32_t | divider, | ||
uint32_t | num ) |
Function for setting clock divider.
ctx | Click object. |
clk_num | Clock number. |
divider | Divider value. |
num | Nominator value. |
@description This function sets clock divider
denom | Denominator value. |
factor | R divider. |
void clockgen_setup_pll | ( | clockgen_t * | ctx, |
uint8_t | pll, | ||
uint8_t | mult, | ||
uint32_t | num ) |
Function for setting pll.
ctx | Click object. |
clk_num | Clock number. |
mult | Multiplier value. |
num | Nominator value. |
@description This function sets pll.
denom | Denominator value. |