From a5e910714733f309b6db18f6017c6f0864e20d38 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Fri, 3 Jan 2014 13:44:39 -0500 Subject: Split up functions in send/receive files for clarity. --- src/isotp/send.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/isotp/send.c') diff --git a/src/isotp/send.c b/src/isotp/send.c index dfba1df3..13db064c 100644 --- a/src/isotp/send.c +++ b/src/isotp/send.c @@ -69,3 +69,19 @@ IsoTpSendHandle isotp_send(IsoTpShims* shims, const uint16_t arbitration_id, return isotp_send_multi_frame(shims, &message, callback); } } + +bool isotp_continue_send(IsoTpShims* shims, IsoTpSendHandle* handle, + const uint16_t arbitration_id, const uint8_t data[], + const uint8_t size) { + // TODO this will need to be tested when we add multi-frame support, + // which is when it'll be necessary to pass in CAN messages to SENDING + // handles. + if(handle->receiving_arbitration_id != arbitration_id) { + if(shims->log != NULL) { + shims->log("The arb ID 0x%x doesn't match the expected tx continuation ID 0x%x", + arbitration_id, handle->receiving_arbitration_id); + } + return false; + } + return false; +} -- cgit 1.2.3-korg