clockgen5 2.0.0.0
Clock Gen 5 Click Driver

API for configuring and manipulating Clock Gen 5 Click driver. More...

Topics

 Clock Gen 5 Registers Settings
 Settings for registers of Clock Gen 5 Click driver.
 
 Clock Gen 5 MikroBUS Map
 MikroBUS pin mapping of Clock Gen 5 Click driver.
 

Functions

void clockgen5_cfg_setup (clockgen5_cfg_t *cfg)
 Clock Gen 5 configuration object setup function.
 
err_t clockgen5_init (clockgen5_t *ctx, clockgen5_cfg_t *cfg)
 Clock Gen 5 initialization function.
 
void clockgen5_out_enable (clockgen5_t *ctx, uint8_t en_out)
 Enable output function.
 
void clockgen5_set_config (clockgen5_t *ctx, uint8_t cfg)
 Set configuration function.
 
void clockgen5_set_freq (clockgen5_t *ctx, float freq)
 Set frequency function.
 

Detailed Description

API for configuring and manipulating Clock Gen 5 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ clockgen5_cfg_setup()

void clockgen5_cfg_setup ( clockgen5_cfg_t * cfg)

Clock Gen 5 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See clockgen5_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ clockgen5_init()

err_t clockgen5_init ( clockgen5_t * ctx,
clockgen5_cfg_t * cfg )

Clock Gen 5 initialization function.

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

Parameters
[out]ctx: Click context object. See clockgen5_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See clockgen5_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ clockgen5_out_enable()

void clockgen5_out_enable ( clockgen5_t * ctx,
uint8_t en_out )

Enable output function.

The function enable output by sets the states of the OE ( RST ) pin.

Parameters
[in]ctx: Click context object. See clockgen5_t object definition for detailed explanation.
[in]en_out: Output enabled or disabled.
Returns
Nothing.

◆ clockgen5_set_config()

void clockgen5_set_config ( clockgen5_t * ctx,
uint8_t cfg )

Set configuration function.

The function set configuration.

Parameters
[in]ctx: Click context object. See clockgen5_t object definition for detailed explanation.
[in]cfg: Config settings of Clock Gen 5 click.
Returns
Nothing.

◆ clockgen5_set_freq()

void clockgen5_set_freq ( clockgen5_t * ctx,
float freq )

Set frequency function.

The function set frequency in range of 1.039 KHz to 68.03 MHz.

Parameters
[in]ctx: Click context object. See clockgen5_t object definition for detailed explanation.
[in]freq: Frequency in KHz ( 1.039 KHz to 68.03 MHz )
Returns
Nothing.