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.
Fork of CAN_bus_reader_pub by
ecu_reader.h
00001 #ifndef ECU_READER_H 00002 #define ECU_READER_H 00003 00004 #define CANSPEED_125 125000 // CAN speed at 125 kbps 00005 #define CANSPEED_250 250000 // CAN speed at 250 kbps 00006 #define CANSPEED_500 500000 // CAN speed at 500 kbps 00007 #define CANSPEED_1M 1000000 // CAN speed at 1Mbps 00008 00009 /* Details from http://en.wikipedia.org/wiki/OBD-II_PIDs */ 00010 #define ENGINE_COOLANT_TEMP 0x05 00011 #define ENGINE_RPM 0x0C 00012 #define VEHICLE_SPEED 0x0D 00013 #define MAF_SENSOR 0x10 00014 #define THROTTLE 0x11 00015 #define O2_VOLTAGE 0x14 00016 00017 #define PID_REQUEST 0x7DF 00018 #define PID_REPLY 0x7E8 00019 00020 #define TIMEOUT 200 00021 00022 namespace mbed { 00023 00024 class ecu_reader{ 00025 00026 public: 00027 00028 ecu_reader(int can_speed); 00029 00030 unsigned char request(unsigned char pid, char *buffer); 00031 00032 private: 00033 00034 int i; 00035 00036 }; 00037 00038 00039 00040 00041 00042 } 00043 00044 00045 00046 #endif
Generated on Mon Aug 1 2022 03:16:42 by
1.7.2
