waveform  2.0.0.0
Data Structures | Macros | Functions
waveform.h File Reference

This file contains API for Waveform Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"

Go to the source code of this file.

Data Structures

struct  waveform_t
 Click ctx object definition. More...
 
struct  waveform_cfg_t
 Click configuration structure definition. More...
 

Macros

#define WAVEFORM_MAP_MIKROBUS(cfg, mikrobus)
 
#define WAVEFORM_RETVAL   uint8_t
 
#define WAVEFORM_OK   0x00
 
#define WAVEFORM_INIT_ERROR   0xFF
 
#define WAVEFORM_CR_B28_BITMASK   1<<13
 
#define WAVEFORM_CR_HLB_BITMASK   1<<12
 
#define WAVEFORM_CR_FSELECT_BITMASK   1<<11
 
#define WAVEFORM_CR_PSELECT_BITMASK   1<<10
 
#define WAVEFORM_CR_RESET_BITMASK   1<<8
 
#define WAVEFORM_CR_SLEEP1_BITMASK   1<<7
 
#define WAVEFORM_CR_SLEEP12_BITMASK   1<<6
 
#define WAVEFORM_CR_OPBITEN_BITMASK   1<<5
 
#define WAVEFORM_CR_DIV2_BITMASK   1<<3
 
#define WAVEFORM_CR_MODE_BITMASK   1<<1
 
#define WAVEFORM_SINE_OUT   0x01
 
#define WAVEFORM_TRIANGLE_OUT   0x02
 
#define WAVEFORM_SQUARE_OUT   0x03
 

Functions

void waveform_cfg_setup (waveform_cfg_t *cfg)
 Config Object Initialization function. More...
 
WAVEFORM_RETVAL waveform_init (waveform_t *ctx, waveform_cfg_t *cfg)
 Initialization function. More...
 
void waveform_digipot_dec (waveform_t *ctx)
 Decrement function. More...
 
void waveform_digipot_inc (waveform_t *ctx)
 Increment function. More...
 
void waveform_write_reg (waveform_t *ctx, uint16_t reg_setting)
 Registry finction. More...
 
void waveform_write_freqency (waveform_t *ctx, uint32_t f)
 Freqency function. More...
 
void waveform_sine_output (waveform_t *ctx, uint32_t f)
 Sinusoide output function. More...
 
void waveform_triangle_output (waveform_t *ctx, uint32_t f)
 Triangle output function. More...
 
void waveform_square_output (waveform_t *ctx, uint32_t f)
 Square output function. More...
 

Detailed Description

This file contains API for Waveform Click driver.