aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristopher Peplin <chris.peplin@rhubarbtech.com>2013-12-30 20:40:50 -0500
committerChristopher Peplin <chris.peplin@rhubarbtech.com>2013-12-30 20:40:50 -0500
commit217bb7fd1657e35a95024bb5bda598ea136fdfbe (patch)
tree5dab9acd9b5793baf7d413b59f5c12801bcad404 /src
parent32f4cbab6bd5769a4b16a584e1880b1deabbd2da (diff)
Add a failing test for a simple diag request/response.
Diffstat (limited to 'src')
-rw-r--r--src/obd2/obd2.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/obd2/obd2.h b/src/obd2/obd2.h
index e6b5bc96..411170da 100644
--- a/src/obd2/obd2.h
+++ b/src/obd2/obd2.h
@@ -12,11 +12,6 @@ extern "C" {
#define MAX_OBD2_PAYLOAD_LENGTH 7
#define VIN_LENGTH 17
-typedef void (*LogShim)(const char* message);
-typedef bool (*SendCanMessageShim)(const uint16_t arbitration_id,
- const uint8_t* data, const uint8_t size);
-typedef bool (*SetTimerShim)(uint16_t time_ms, void (*callback));
-
typedef struct {
uint16_t arbitration_id;
uint8_t mode;
@@ -29,6 +24,7 @@ typedef struct {
// http://www.canbushack.com/blog/index.php?title=scanning-for-diagnostic-data&more=1&c=1&tb=1&pb=1
// for the list of NRCs
typedef enum {
+ NRC_SUCCESS = 0x0,
NRC_SERVICE_NOT_SUPPORTED = 0x11,
NRC_SUB_FUNCTION_NOT_SUPPORTED = 0x12,
NRC_CONDITIONS_NOT_CORRECT = 0x22,
@@ -162,7 +158,7 @@ bool diagnostic_clear_dtc(DiagnosticShims* shims);
DiagnosticRequestHandle diagnostic_enumerate_pids(DiagnosticShims* shims,
DiagnosticRequest* request, DiagnosticPidEnumerationReceived callback);
-void diagnostic_receive_can_frame(DiagnosticRequestHandle* handler,
+void diagnostic_receive_can_frame(DiagnosticRequestHandle* handle,
const uint16_t arbitration_id, const uint8_t data[],
const uint8_t size);