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

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

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

Go to the source code of this file.

Data Structures

struct  noise_t
 Analog data type. More...
 
struct  noise_cfg_t
 Click configuration structure definition. More...
 

Macros

#define NOISE_MAP_MIKROBUS(cfg, mikrobus)
 
#define NOISE_RETVAL   uint8_t
 
#define NOISE_OK   0x00
 
#define NOISE_INIT_ERROR   0xFF
 
#define NOISE_DEFAULT_COMMAND   0x01
 
#define NOISE_DEFAULT_THRESHOLD   0x0064
 
#define NOISE_DAC_A   0x00
 
#define NOISE_DAC_B   0x08
 
#define NOISE_VREF_UNBUFFERED   0x00
 
#define NOISE_VREF_BUFFERED   0x04
 
#define NOISE_GAIN_2X   0x00
 
#define NOISE_GAIN_1X   0x02
 
#define NOISE_SHDN_ENABLE   0x00
 
#define NOISE_SHDN_DISABLE   0x01
 

Functions

void noise_cfg_setup (noise_cfg_t *cfg)
 Config Object Initialization function. More...
 
NOISE_RETVAL noise_init (noise_t *ctx, noise_cfg_t *cfg)
 Initialization function. More...
 
void noise_default_cfg (noise_t *ctx)
 Click Default Configuration function. More...
 
void noise_generic_transfer (noise_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function. More...
 
void noise_write_command_register (noise_t *ctx, uint16_t command_and_data_bits)
 Write to Command Register. More...
 
uint8_t noise_set_command_register (noise_t *ctx, uint8_t configuration, uint16_t threshold)
 Set Command Register. More...
 
void noise_set_state (noise_t *ctx, uint8_t state)
 Enable/disable click. More...
 
void noise_reset (noise_t *ctx)
 Reset Click. More...
 
uint8_t noise_check_int_pin (noise_t *ctx)
 Get INT pin state. More...
 
uint16_t noise_generic_read (noise_t *ctx)
 Read ADC Value. More...
 

Detailed Description

This file contains API for Noise Click driver.