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.
Dependencies: mbed CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP
Fork of SystemManagement by
Diff: Get_IMD/IMD.h
- Revision:
- 8:ecf68db484af
- Child:
- 12:e0adb697fcdb
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Get_IMD/IMD.h Fri Oct 10 21:46:52 2014 +0000
@@ -0,0 +1,28 @@
+// copied idea from http://developer.mbed.org/forum/mbed/topic/466/?page=1#comment-2457
+
+#ifndef _FILE_IMD_H
+#define _FILE_IMD_H
+
+#include "mbed.h"
+#include "CANBuffer.h"
+#include "rtos.h"
+
+const int TX_IMD_ID = ((4 << 8) | 7);
+
+class IMD{
+ public:
+ IMD(CANBuffer *can);
+ void start_update();
+ float frequency();
+ float pulse_width();
+ float duty();
+
+ private:
+ InterruptIn _p;
+ Timer _t;
+ float _pulsewidth, _period;
+ void rise();
+ void fall();
+};
+
+#endif
\ No newline at end of file
