noise 2.0.0.0
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
 Click ctx object definition. More...
 
struct  noise_cfg_t
 Click configuration structure definition. More...
 

Macros

#define NOISE_MAP_MIKROBUS(cfg, mikrobus)
 
#define NOISE_OK   0
 
#define NOISE_ERROR   -1
 
#define NOISE_DEFAULT_COMMAND   0x07
 
#define NOISE_DEFAULT_THRESHOLD   0x0400
 
#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.
 
err_t noise_init (noise_t *ctx, noise_cfg_t *cfg)
 Initialization function.
 
void noise_default_cfg (noise_t *ctx)
 Click Default Configuration function.
 
void noise_write_cmd_reg (noise_t *ctx, uint16_t cmd_data)
 Write to Command Register.
 
err_t noise_set_cmd_reg (noise_t *ctx, uint8_t configuration, uint16_t threshold)
 Set Command Register.
 
void noise_set_state (noise_t *ctx, uint8_t state)
 Enable/disable click.
 
void noise_reset (noise_t *ctx)
 Reset Click.
 
uint8_t noise_check_int_pin (noise_t *ctx)
 Get INT pin state.
 
err_t noise_read_an_pin_value (noise_t *ctx, uint16_t *data_out)
 Noise read AN pin value function.
 
err_t noise_read_an_pin_voltage (noise_t *ctx, float *data_out)
 Noise read AN pin voltage level function.
 

Detailed Description

This file contains API for Noise Click driver.