clockgen3 2.0.0.0

Functions

void clockgen3_cfg_setup (clockgen3_cfg_t *cfg)
 Config Object Initialization function.
 
err_t clockgen3_init (clockgen3_t *ctx, clockgen3_cfg_t *cfg)
 Initialization function.
 
void clockgen3_config (clockgen3_t *ctx, uint8_t cfg)
 Configuration.
 
void clockgen3_set_cs_pin (clockgen3_t *ctx, uint8_t state)
 Sets CS pin state.
 
void clockgen3_generic_write (clockgen3_t *ctx, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void clockgen3_generic_read (clockgen3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void clockgen3_set_freq (clockgen3_t *ctx, float freq)
 Sets Frequency.
 

Detailed Description

Function Documentation

◆ clockgen3_cfg_setup()

void clockgen3_cfg_setup ( clockgen3_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.

◆ clockgen3_config()

void clockgen3_config ( clockgen3_t * ctx,
uint8_t cfg )

Configuration.

Parameters
ctxClick object.
cfgConfiguration
Note
Options for configuration:
   CLOCKGEN3_CFG_ON_CLK_180,
   CLOCKGEN3_CFG_OFF_ON,
   CLOCKGEN3_CFG_ON_OFF,
   CLOCKGEN3_CFG_POWER_DOWN

◆ clockgen3_generic_read()

void clockgen3_generic_read ( clockgen3_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.

◆ clockgen3_generic_write()

void clockgen3_generic_write ( clockgen3_t * ctx,
uint8_t * data_buf,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ clockgen3_init()

err_t clockgen3_init ( clockgen3_t * ctx,
clockgen3_cfg_t * cfg )

Initialization function.

Parameters
clockgen3Click object.
cfgClick configuration structure.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation. @description This function initializes all necessary pins and peripherals used for this click.

◆ clockgen3_set_cs_pin()

void clockgen3_set_cs_pin ( clockgen3_t * ctx,
uint8_t state )

Sets CS pin state.

Parameters
ctxClick object.
stateCS pin state

◆ clockgen3_set_freq()

void clockgen3_set_freq ( clockgen3_t * ctx,
float freq )

Sets Frequency.

Parameters
ctxClick object.
freqFrequency in KHz ( 1.039 KHz to 68.03 MHz )