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

This file contains API for LDC 1000 Click driver. More...

#include "mikrosdk_version.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"
#include "math.h"

Go to the source code of this file.

Data Structures

struct  ldc1000_t
 Click ctx object definition. More...
 
struct  ldc1000_cfg_t
 Click configuration structure definition. More...
 

Macros

#define LDC1000_MAP_MIKROBUS(cfg, mikrobus)
 
#define LDC1000_RETVAL   uint8_t
 
#define LDC1000_OK   0x00
 
#define LDC1000_INIT_ERROR   0xFF
 
#define LDC1000_CMD_ID   0x00
 
#define LDC1000_CMD_RPMAX   0x01
 
#define LDC1000_CMD_RPMIN   0x02
 
#define LDC1000_CMD_SENSORFREQ   0x03
 
#define LDC1000_CMD_LDCCONFIG   0x04
 
#define LDC1000_CMD_CLKCONFIG   0x05
 
#define LDC1000_CMD_THRESHILSB   0x06
 
#define LDC1000_CMD_THRESHIMSB   0x07
 
#define LDC1000_CMD_THRESLOLSB   0x08
 
#define LDC1000_CMD_THRESLOMSB   0x09
 
#define LDC1000_CMD_INTCONFIG   0x0A
 
#define LDC1000_CMD_PWRCONFIG   0x0B
 
#define LDC1000_CMD_STATUS   0x20
 
#define LDC1000_CMD_PROXLSB   0x21
 
#define LDC1000_CMD_PROXMSB   0x22
 
#define LDC1000_CMD_FREQCTRLSB   0x23
 
#define LDC1000_CMD_FREQCTRMID   0x24
 
#define LDC1000_CMD_FREQCTRMSB   0x25
 
#define LDC1000_RPMAX_38_785K   0x11
 
#define LDC1000_RPMIN_2_39K   0x3B
 
#define LDC1000_SENSORFREQ_N217_F20   0xD9
 
#define LDC1000_LDCCONFIG_A2V_T6144   0x0F
 
#define LDC1000_CLKCONFIG_EC_ET_ENABLE   0x02
 
#define LDC1000_PWRCONFIG_ACTIVE_MODE   0x01
 
#define LDC1000_CMD_SPI_READ   0x80
 
#define LDC1000_SENSITIVITY   100
 

Functions

void ldc1000_cfg_setup (ldc1000_cfg_t *cfg)
 Config Object Initialization function. More...
 
LDC1000_RETVAL ldc1000_init (ldc1000_t *ctx, ldc1000_cfg_t *cfg)
 Initialization function. More...
 
void ldc1000_default_cfg (ldc1000_t *ctx)
 Click Default Configuration function. More...
 
void ldc1000_write_byte (ldc1000_t *ctx, uint8_t address, uint8_t input_data)
 Byte write function. More...
 
uint8_t ldc1000_read_byte (ldc1000_t *ctx, uint8_t address)
 Byte read function. More...
 
uint16_t ldc1000_get_proximity_data (ldc1000_t *ctx)
 Get proximity data function. More...
 
float ldc1000_get_inductance_data (ldc1000_t *ctx)
 Get inductance data function. More...
 
uint8_t ldc1000_get_int_input (ldc1000_t *ctx)
 Get interrupt pin input function. More...
 

Detailed Description

This file contains API for LDC 1000 Click driver.