Library to communicate with LDC1614

Dependencies:   SHTx

Dependents:   Inductive_Sensor_3

Fork of LDC1101 by Bob Giesberts

Committer:
bobgiesberts
Date:
Wed Sep 21 14:25:20 2016 +0000
Revision:
34:b03d7bb9010c
Parent:
32:9712c9bdaf44
Removed address bug in I2CRead(); Libraries are loaded in .h (and not double in .cpp)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bobgiesberts 31:ab4354a71996 1 #ifndef _register_values_H_
bobgiesberts 31:ab4354a71996 2 #define _register_values_H_
bobgiesberts 31:ab4354a71996 3
bobgiesberts 31:ab4354a71996 4
bobgiesberts 31:ab4354a71996 5 typedef enum { LDC_MODE_ACTIVE = 0, \
bobgiesberts 31:ab4354a71996 6 LDC_MODE_SLEEP = 1, \
bobgiesberts 31:ab4354a71996 7 LDC_MODE_SHUTDOWN = 2} LDC_MODE;
bobgiesberts 31:ab4354a71996 8
bobgiesberts 31:ab4354a71996 9 typedef enum { DEGLITCH_1M = 1, \
bobgiesberts 31:ab4354a71996 10 DEGLITCH_3M = 4, \
bobgiesberts 31:ab4354a71996 11 DEGLITCH_10M = 5, \
bobgiesberts 31:ab4354a71996 12 DEGLITCH_33M = 7} DEGLITCHER; // This should be 011 (p. 16) or 111 (p.32)
bobgiesberts 31:ab4354a71996 13
bobgiesberts 31:ab4354a71996 14 typedef enum { DATA_MSB_CH0 = 0x00, \
bobgiesberts 31:ab4354a71996 15 DATA_LSB_CH0 = 0x01, \
bobgiesberts 31:ab4354a71996 16 DATA_MSB_CH1 = 0x02, \
bobgiesberts 31:ab4354a71996 17 DATA_LSB_CH1 = 0x03, \
bobgiesberts 31:ab4354a71996 18 DATA_MSB_CH2 = 0x04, \
bobgiesberts 31:ab4354a71996 19 DATA_LSB_CH2 = 0x05, \
bobgiesberts 31:ab4354a71996 20 DATA_MSB_CH3 = 0x06, \
bobgiesberts 31:ab4354a71996 21 DATA_LSB_CH3 = 0x07, \
bobgiesberts 31:ab4354a71996 22 RCOUNT_CH0 = 0x08, \
bobgiesberts 31:ab4354a71996 23 RCOUNT_CH1 = 0x09, \
bobgiesberts 31:ab4354a71996 24 RCOUNT_CH2 = 0x0A, \
bobgiesberts 31:ab4354a71996 25 RCOUNT_CH3 = 0x0B, \
bobgiesberts 31:ab4354a71996 26 OFFSET_CH0 = 0x0C, \
bobgiesberts 31:ab4354a71996 27 OFFSET_CH1 = 0x0D, \
bobgiesberts 31:ab4354a71996 28 OFFSET_CH2 = 0x0E, \
bobgiesberts 31:ab4354a71996 29 OFFSET_CH3 = 0x0F, \
bobgiesberts 31:ab4354a71996 30 SETTLECOUNT_CH0 = 0x10, \
bobgiesberts 31:ab4354a71996 31 SETTLECOUNT_CH1 = 0x11, \
bobgiesberts 31:ab4354a71996 32 SETTLECOUNT_CH2 = 0x12, \
bobgiesberts 31:ab4354a71996 33 SETTLECOUNT_CH3 = 0x13, \
bobgiesberts 31:ab4354a71996 34 CLOCK_DIVIDERS_CH0 = 0x14, \
bobgiesberts 31:ab4354a71996 35 CLOCK_DIVIDERS_CH1 = 0x15, \
bobgiesberts 31:ab4354a71996 36 CLOCK_DIVIDERS_CH2 = 0x16, \
bobgiesberts 31:ab4354a71996 37 CLOCK_DIVIDERS_CH3 = 0x17, \
bobgiesberts 31:ab4354a71996 38 STATUS = 0x18, \
bobgiesberts 31:ab4354a71996 39 ERROR_CONFIG = 0x19, \
bobgiesberts 31:ab4354a71996 40 CONFIG = 0x1A, \
bobgiesberts 31:ab4354a71996 41 MUX_CONFIG = 0x1B, \
bobgiesberts 31:ab4354a71996 42 DRIVE_CURRENT_CH0 = 0x1E, \
bobgiesberts 31:ab4354a71996 43 DRIVE_CURRENT_CH1 = 0x1F, \
bobgiesberts 31:ab4354a71996 44 DRIVE_CURRENT_CH2 = 0x20, \
bobgiesberts 32:9712c9bdaf44 45 DRIVE_CURRENT_CH3 = 0x21, \
bobgiesberts 32:9712c9bdaf44 46 MANUFACTURER_ID = 0x7E, \
bobgiesberts 32:9712c9bdaf44 47 DEVICE_ID = 0x7F} ADDR;
bobgiesberts 31:ab4354a71996 48
bobgiesberts 31:ab4354a71996 49 typedef enum { CHx_ERR_UR = 15, \
bobgiesberts 31:ab4354a71996 50 CHx_ERR_OR = 14, \
bobgiesberts 31:ab4354a71996 51 CHx_ERR_WD = 13, \
bobgiesberts 31:ab4354a71996 52 CHx_ERR_AE = 12, \
bobgiesberts 31:ab4354a71996 53 ERR_CHAN = 14, \
bobgiesberts 31:ab4354a71996 54 ERR_UR = 13, \
bobgiesberts 31:ab4354a71996 55 ERR_OR = 12, \
bobgiesberts 31:ab4354a71996 56 ERR_WD = 11, \
bobgiesberts 31:ab4354a71996 57 ERR_AHE = 10, \
bobgiesberts 31:ab4354a71996 58 ERR_ALE = 9, \
bobgiesberts 31:ab4354a71996 59 ERR_ZC = 8, \
bobgiesberts 31:ab4354a71996 60 DRDY = 6, \
bobgiesberts 31:ab4354a71996 61 CH0_UNREADCONV = 3, \
bobgiesberts 31:ab4354a71996 62 CH1_UNREADCONV = 2, \
bobgiesberts 31:ab4354a71996 63 CH2_UNREADCONV = 1, \
bobgiesberts 31:ab4354a71996 64 CH3_UNREADCONV = 0, \
bobgiesberts 31:ab4354a71996 65 UR_ERR2OUT = 15, \
bobgiesberts 31:ab4354a71996 66 OR_ERR2OUT = 14, \
bobgiesberts 31:ab4354a71996 67 WD_ERR2OUT = 13, \
bobgiesberts 31:ab4354a71996 68 AH_ERR2OUT = 12, \
bobgiesberts 31:ab4354a71996 69 AL_ERR2OUT = 11, \
bobgiesberts 31:ab4354a71996 70 UR_ERR2INT = 7, \
bobgiesberts 31:ab4354a71996 71 OR_ERR2INT = 6, \
bobgiesberts 31:ab4354a71996 72 WD_ERR2INT = 5, \
bobgiesberts 31:ab4354a71996 73 AH_ERR2INT = 4, \
bobgiesberts 31:ab4354a71996 74 AL_ERR2INT = 3, \
bobgiesberts 31:ab4354a71996 75 ZC_ERR2INT = 2, \
bobgiesberts 31:ab4354a71996 76 DRDY_2INT = 0, \
bobgiesberts 31:ab4354a71996 77 ACTIVE_CHAN = 14, \
bobgiesberts 31:ab4354a71996 78 SLEEP_MODE_EN = 13, \
bobgiesberts 31:ab4354a71996 79 RP_OVERRIDE_EN = 12, \
bobgiesberts 31:ab4354a71996 80 SENSOR_ACTIVATE_SEL = 11, \
bobgiesberts 31:ab4354a71996 81 AUTO_AMP_DIS = 10, \
bobgiesberts 31:ab4354a71996 82 REF_CLK_SRC = 9, \
bobgiesberts 31:ab4354a71996 83 INTB_DIS = 7, \
bobgiesberts 31:ab4354a71996 84 HIGH_CURRENT_DRV = 6, \
bobgiesberts 31:ab4354a71996 85 AUTOSCAN_EN = 15, \
bobgiesberts 31:ab4354a71996 86 RR_SEQUENCE = 13, \
bobgiesberts 32:9712c9bdaf44 87 DEGLITCH = 0, \
bobgiesberts 34:b03d7bb9010c 88 CHx_INIT_IDRIVE = 6, \
bobgiesberts 34:b03d7bb9010c 89 CHx_IDRIVE = 11, \
bobgiesberts 34:b03d7bb9010c 90 CHx_FIN_DIVIDER = 12, \
bobgiesberts 34:b03d7bb9010c 91 CHx_FREF_DIVIDER = 0} SETTING;
bobgiesberts 31:ab4354a71996 92
bobgiesberts 31:ab4354a71996 93 #endif