38 #include "drv_digital_in.h" 39 #include "drv_spi_master.h" 53 #define LDC1000_MAP_MIKROBUS( cfg, mikrobus ) \ 54 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \ 55 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \ 56 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \ 57 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \ 58 cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT ) 65 #define LDC1000_RETVAL uint8_t 67 #define LDC1000_OK 0x00 68 #define LDC1000_INIT_ERROR 0xFF 75 #define LDC1000_CMD_ID 0x00 76 #define LDC1000_CMD_RPMAX 0x01 77 #define LDC1000_CMD_RPMIN 0x02 78 #define LDC1000_CMD_SENSORFREQ 0x03 79 #define LDC1000_CMD_LDCCONFIG 0x04 80 #define LDC1000_CMD_CLKCONFIG 0x05 81 #define LDC1000_CMD_THRESHILSB 0x06 82 #define LDC1000_CMD_THRESHIMSB 0x07 83 #define LDC1000_CMD_THRESLOLSB 0x08 84 #define LDC1000_CMD_THRESLOMSB 0x09 85 #define LDC1000_CMD_INTCONFIG 0x0A 86 #define LDC1000_CMD_PWRCONFIG 0x0B 87 #define LDC1000_CMD_STATUS 0x20 88 #define LDC1000_CMD_PROXLSB 0x21 89 #define LDC1000_CMD_PROXMSB 0x22 90 #define LDC1000_CMD_FREQCTRLSB 0x23 91 #define LDC1000_CMD_FREQCTRMID 0x24 92 #define LDC1000_CMD_FREQCTRMSB 0x25 99 #define LDC1000_RPMAX_38_785K 0x11 100 #define LDC1000_RPMIN_2_39K 0x3B 101 #define LDC1000_SENSORFREQ_N217_F20 0xD9 102 #define LDC1000_LDCCONFIG_A2V_T6144 0x0F 103 #define LDC1000_CLKCONFIG_EC_ET_ENABLE 0x02 104 #define LDC1000_PWRCONFIG_ACTIVE_MODE 0x01 105 #define LDC1000_CMD_SPI_READ 0x80 106 #define LDC1000_SENSITIVITY 100 248 #endif // _LDC1000_H_ pin_name_t cs
Definition: ldc1000.h:144
Click configuration structure definition.
Definition: ldc1000.h:137
#define LDC1000_RETVAL
Definition: ldc1000.h:65
uint16_t ldc1000_get_proximity_data(ldc1000_t *ctx)
Get proximity data function.
pin_name_t sck
Definition: ldc1000.h:143
uint8_t ldc1000_get_int_input(ldc1000_t *ctx)
Get interrupt pin input function.
spi_master_t spi
Definition: ldc1000.h:129
digital_in_t int_pin
Definition: ldc1000.h:125
uint8_t ldc1000_read_byte(ldc1000_t *ctx, uint8_t address)
Byte read function.
spi_master_chip_select_polarity_t cs_polarity
Definition: ldc1000.h:154
uint8_t spi_mode
Definition: ldc1000.h:153
pin_name_t chip_select
Definition: ldc1000.h:130
pin_name_t int_pin
Definition: ldc1000.h:148
void ldc1000_write_byte(ldc1000_t *ctx, uint8_t address, uint8_t input_data)
Byte write function.
uint32_t spi_speed
Definition: ldc1000.h:152
void ldc1000_default_cfg(ldc1000_t *ctx)
Click Default Configuration function.
void ldc1000_cfg_setup(ldc1000_cfg_t *cfg)
Config Object Initialization function.
float ldc1000_get_inductance_data(ldc1000_t *ctx)
Get inductance data function.
digital_out_t cs
Definition: ldc1000.h:121
pin_name_t miso
Definition: ldc1000.h:141
LDC1000_RETVAL ldc1000_init(ldc1000_t *ctx, ldc1000_cfg_t *cfg)
Initialization function.
pin_name_t mosi
Definition: ldc1000.h:142
Click ctx object definition.
Definition: ldc1000.h:119