clockgen3 2.0.0.0
clockgen3.h File Reference

This file contains API for Clock Gen 3 Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  clockgen3_t
 Click ctx object definition. More...
 
struct  clockgen3_cfg_t
 Click configuration structure definition. More...
 

Macros

#define CLOCKGEN3_MAP_MIKROBUS(cfg, mikrobus)
 
#define CLOCKGEN3_OK   0
 
#define CLOCKGEN3_ERROR   -1
 
#define CLOCKGEN3_OCT_0   0
 
#define CLOCKGEN3_OCT_1   1
 
#define CLOCKGEN3_OCT_2   2
 
#define CLOCKGEN3_OCT_3   3
 
#define CLOCKGEN3_OCT_4   4
 
#define CLOCKGEN3_OCT_5   5
 
#define CLOCKGEN3_OCT_6   6
 
#define CLOCKGEN3_OCT_7   7
 
#define CLOCKGEN3_OCT_8   8
 
#define CLOCKGEN3_OCT_9   9
 
#define CLOCKGEN3_OCT_10   10
 
#define CLOCKGEN3_OCT_11   11
 
#define CLOCKGEN3_OCT_12   12
 
#define CLOCKGEN3_OCT_13   13
 
#define CLOCKGEN3_OCT_14   14
 
#define CLOCKGEN3_OCT_15   15
 
#define CLOCKGEN3_SLAVE_ADDRESS_GND   0x17
 
#define CLOCKGEN3_SLAVE_ADDRESS_VCC   0x16
 
#define CLOCKGEN3_CFG_ON_CLK_180   0x00
 
#define CLOCKGEN3_CFG_OFF_ON   0x01
 
#define CLOCKGEN3_CFG_ON_OFF   0x02
 
#define CLOCKGEN3_CFG_POWER_DOWN   0x03
 

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

This file contains API for Clock Gen 3 Click driver.