Library to communicate with LDC1614
Dependents: Inductive_Sensor_3
Fork of LDC1101 by
Diff: LDC1101.cpp
- Revision:
- 21:7c9e04e7d34f
- Parent:
- 20:8e1b1efdbb49
- Child:
- 22:8da965ce5af3
--- a/LDC1101.cpp Fri Dec 18 15:49:12 2015 +0000 +++ b/LDC1101.cpp Tue Jan 05 11:03:22 2016 +0000 @@ -26,9 +26,9 @@ init(); } -void LDC1101::func_mode(LDC_MODE mode) { writeSPI((uint8_t *)(&mode), 0x0B); wait(0.1); } -void LDC1101::sleep(void) { /* stop toggling the CLKIN pin input and drive the CLKIN pin Low */ func_mode(LDC_MODE_SHUTDOWN); } -void LDC1101::wakeup(void) { /* start toggling the clock input on the CLKIN pin */ init(); } +void LDC1101::func_mode(LDC_MODE mode) { writeSPI((uint8_t *)(&mode), 0x0B); wait_ms(0.8); } +void LDC1101::sleep(void) { /* stop toggling the CLKIN pin input and drive the CLKIN pin Low */ func_mode( LDC_MODE_STANDBY ); } +void LDC1101::wakeup(void) { /* start toggling the clock input on the CLKIN pin */ func_mode( LDC_MODE_ACTIVE ); wait(0.5); } void LDC1101::init()