diff options
author | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2014-01-02 12:00:52 -0500 |
---|---|---|
committer | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2014-01-02 12:10:48 -0500 |
commit | 7a5e3a7037170aacc3f3438f1267c635358d91a8 (patch) | |
tree | 8fd8dd29fb7a45962982ce4a41b7fb0ec6af1927 /README.mkd | |
parent | 1d6ab7e3c86cfd018977cab89a0dd32762984d58 (diff) |
Match isotp receive_can_frame style, depend less on callbacks.
Diffstat (limited to 'README.mkd')
-rw-r--r-- | README.mkd | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -53,21 +53,21 @@ what we need is another layer on top of that to handle the repeated requests. void my_callback(const DiagnosticResponse* response) { } - DiagnosticRequestHandler handler = diagnostic_init(my_callback); + DiagnosticRequestHandle handle = diagnostic_init(my_callback); DiagnosticRequest request = { arbitratin_id: 0x7df, mode: OBD2_MODE_POWERTRAIN_DIAGNOSTIC_REQUEST, pid: 3 }; - diagnostic_send(&handler, &request); + diagnostic_send(&handle, &request); while(true) { - diagnostic_handle_can_frame(&handler, 42, data, 8); + diagnostic_handle_can_frame(&handle, 42, data, 8); } - diagnostic_request_pid(&handler, DIAGNOSTIC_STANDARD_PID, 42 + diagnostic_request_pid(&handle, DIAGNOSTIC_STANDARD_PID, 42 - diagnostic_destroy(&handler); + diagnostic_destroy(&handle); ## Testing |