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.h
- Revision:
- 1:a88df80e7664
- Parent:
- 0:90873b4e8330
- Child:
- 2:44b76f6f19d5
--- a/LDC1000.h Sun Apr 05 18:19:12 2015 +0000
+++ b/LDC1000.h Wed Apr 29 14:57:22 2015 +0000
@@ -29,7 +29,7 @@
LDC_AMPLITUDE_2V, \
LDC_AMPLITUDE_4V} LDC_AMPLITUDE;
-typedef enum { LDC_MODE_STANDBY = 0; LDC_MODE_ACTIVE = 1} LDC_MODE;
+typedef enum { LDC_MODE_STANDBY = 0, LDC_MODE_ACTIVE = 1} LDC_MODE;
/**
@@ -49,7 +49,7 @@
* The constructor sets the LDC1000 in Active mode.
* @param mode choose from LDC_MODE_ACTIVE or LDC_MODE STANDBY
**/
- void mode(LDC_MODE mode){writeSPI(&mode, 0x0B);};
+ void mode(LDC_MODE mode){writeSPI((uint8_t *)(&mode), 0x0B);};
/**
* @brief get the calculated inductance value
**/
@@ -88,8 +88,8 @@
* - LDC_AMPLITUDE_2V
* - LDC_AMPLITUDE_4V
**/
- enable power
void setOutputPower(LDC_AMPLITUDE amplitude);
+
private:
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);
