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 mbed-STM32F103C8T6
Diff: ecu_reader.h
- Revision:
- 0:908be729d27c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ecu_reader.h Thu Jul 08 21:05:29 2010 +0000
@@ -0,0 +1,43 @@
+#ifndef ECU_READER_H
+#define ECU_READER_H
+
+#define CANSPEED_125 125000 // CAN speed at 125 kbps
+#define CANSPEED_250 250000 // CAN speed at 250 kbps
+#define CANSPEED_500 500000 // CAN speed at 500 kbps
+
+ /* Details from http://en.wikipedia.org/wiki/OBD-II_PIDs */
+#define ENGINE_COOLANT_TEMP 0x05
+#define ENGINE_RPM 0x0C
+#define VEHICLE_SPEED 0x0D
+#define MAF_SENSOR 0x10
+#define THROTTLE 0x11
+#define O2_VOLTAGE 0x14
+
+#define PID_REQUEST 0x7DF
+#define PID_REPLY 0x7E8
+
+namespace mbed {
+
+class ecu_reader{
+
+public:
+
+ ecu_reader(int can_speed);
+
+ unsigned char request(unsigned char pid, char *buffer);
+
+private:
+
+ int i;
+
+};
+
+
+
+
+
+ }
+
+
+
+#endif
\ No newline at end of file