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.
Diff: MicrobitUltrasound.h
- Revision:
- 14:3a9232725ff8
- Parent:
- 10:9008f714df44
- Child:
- 15:36c4434352ca
diff -r 26467bc2991c -r 3a9232725ff8 MicrobitUltrasound.h
--- a/MicrobitUltrasound.h Tue Aug 30 22:09:47 2016 +0200
+++ b/MicrobitUltrasound.h Tue Sep 06 20:34:15 2016 +0200
@@ -64,6 +64,7 @@
#define ULTRASOUND_STATUS_EVENTON_FALL 0x08
#define ULTRASOUND_STATUS_EVENTON_PULSE 0x10
#define ULTRASOUND_STATUS_EVENTON_TRIGGER 0x20
+#define ULTRASOUND_STATUS_EVENTON_EDGE 0x40
/**
@@ -76,7 +77,6 @@
class MicrobitUltrasound : public MicroBitComponent
{
unsigned long sampleTime;
- uint32_t echoDuration;
uint16_t triggerPeriod_ms;
uint16_t triggerDuration_us;
bool triggerActiveValue;
@@ -124,15 +124,7 @@
*
* @return period the requested time between triggers, in milliseconds.
*/
- void getPeriod();
-
- /**
- * Get the pulse's duration from sensor, last updated sample
- *
- * @return the latest updated pulse duration.
- *
- */
- int getEchoDuration();
+ uint16_t getPeriod();
/**
@@ -165,7 +157,7 @@
*
* @return MICROBIT_OK on success.
*/
- int fireTrigger(void);
+ void fireTrigger(void);
/**
* Periodic callback from MicroBit idle thread.