Library to communicate with LDC1614
Dependents: Inductive_Sensor_3
Fork of LDC1101 by
Diff: LDC1101.h
- Revision:
- 22:8da965ce5af3
- Parent:
- 20:8e1b1efdbb49
- Child:
- 25:ae111662ee03
--- a/LDC1101.h Tue Jan 05 11:03:22 2016 +0000 +++ b/LDC1101.h Sat Jan 16 09:12:32 2016 +0000 @@ -86,20 +86,9 @@ * 0 - not disabled: RP_MAX is driven * 1 - disabled: RP_MAX is ignored, current drive is off. * @param RPMIN [2:0] - * pi * V_amp - * R_p = ----------- - * 4 * I_drive * This setting can be calibrated with the target closest to the sensor: R_p(d = 0mm) * RPMIN < 0.8 x R_p(d = 0mm) * If R_p < 750 Ohm --> increase distance to target - * - 000: RPMIN = 96 kOhm | I_drive = 4.7 uA - * - 001: RPMIN = 48 kOhm | I_drive = 9.4 uA - * - 010: RPMIN = 24 kOhm | I_drive = 18.7 uA - * - 011: RPMIN = 12 kOhm | I_drive = 37.5 uA - * - 100: RPMIN = 6 kOhm | I_drive = 75 uA - * - 101: RPMIN = 3 kOhm | I_drive = 150 uA - * - 110: RPMIN = 1.5 kOhm | I_drive = 300 uA - * - 111: RPMIN = 0.75 kOhm | I_drive = 600 uA (default) **/ void setRPsettings(bool RPMAX_DIS, RPMIN rpmin); @@ -213,7 +202,10 @@ **/ float get_Q(void); - + uint8_t get_status(void); + uint8_t get_LHR_status(void); + bool is_New_LHR_data(void); + bool is_Oscillation_Error(void); @@ -222,9 +214,8 @@ void readSPI(uint8_t *data, uint8_t address, uint8_t num_bytes = 1); void writeSPI(uint8_t *data, uint8_t address, uint8_t num_bytes = 1); void writeSPIregister(uint8_t reg, uint8_t value){writeSPI(&value,reg);}; // VERKEERD OM?! + void suicide(void *obj) {delete obj;}; - // uint32_t readINTB(void); // EXTRA UNTB Read register - // uint32_t INTB; // extra: read register INTB uint16_t _responsetime; // Response Time uint8_t _divider; // divider