Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Inductive_Sensor_3
Fork of LDC1101 by
Diff: LDC1000.cpp
- Revision:
- 6:5b6ad98d6436
- Parent:
- 5:98d4fd07734a
- Child:
- 7:7f1522ad3df5
diff -r 98d4fd07734a -r 5b6ad98d6436 LDC1000.cpp
--- a/LDC1000.cpp Tue May 26 14:34:05 2015 +0000
+++ b/LDC1000.cpp Tue May 26 14:43:33 2015 +0000
@@ -18,16 +18,16 @@
_spiport.frequency(1E6);
_cs_pin.write(1);
wait_us(100);
- mode(LDC_MODE_STANDBY);
+ //mode(LDC_MODE_STANDBY);
setFrequency(f_external);
wait(0.1);
- setOutputPower(LDC_AMPLITUDE_4V);
+ //setOutputPower(LDC_AMPLITUDE_4V);
wait_us(10);
- setResponseTime(LDC_RESPONSE_384);
- setWatchdog(5000);
+ //setResponseTime(LDC_RESPONSE_384);
+ //setWatchdog(5000);
// Write comando's like in EVM start log:
- /* writeSPIregister(0x0B,0x00);
+ writeSPIregister(0x0B,0x00);
writeSPIregister(0x01,0x0E);
writeSPIregister(0x02,0x3C);
writeSPIregister(0x03,0x15);
@@ -39,7 +39,7 @@
writeSPIregister(0x09,0x12);
writeSPIregister(0x0A,0x04);
// writeSPIregister(0x0C,0x01);
- writeSPIregister(0x0B,0x01);*/
+ writeSPIregister(0x0B,0x01);
mode(LDC_MODE_ACTIVE);
}
@@ -96,7 +96,8 @@
uint32_t value;
} val;
val.value = 0;
- readSPI(val.buf,0x23,3);
+ uint8_t bla[5];
+ readSPI(bla,0x21,5);
return val.value;
}
