summaryrefslogtreecommitdiffstats
path: root/src/isotp/send.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/isotp/send.c')
-rw-r--r--src/isotp/send.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/isotp/send.c b/src/isotp/send.c
index b87c5602..dfba1df3 100644
--- a/src/isotp/send.c
+++ b/src/isotp/send.c
@@ -11,12 +11,11 @@ void isotp_complete_send(IsoTpShims* shims, IsoTpMessage* message,
}
}
-IsoTpHandle isotp_send_single_frame(IsoTpShims* shims, IsoTpMessage* message,
+IsoTpSendHandle isotp_send_single_frame(IsoTpShims* shims, IsoTpMessage* message,
IsoTpMessageSentHandler callback) {
- IsoTpHandle handle = {
+ IsoTpSendHandle handle = {
success: false,
- completed: true,
- type: ISOTP_HANDLE_SENDING
+ completed: true
};
uint8_t can_data[CAN_MESSAGE_BYTE_SIZE] = {0};
@@ -42,21 +41,20 @@ IsoTpHandle isotp_send_single_frame(IsoTpShims* shims, IsoTpMessage* message,
return handle;
}
-IsoTpHandle isotp_send_multi_frame(IsoTpShims* shims, IsoTpMessage* message,
+IsoTpSendHandle isotp_send_multi_frame(IsoTpShims* shims, IsoTpMessage* message,
IsoTpMessageSentHandler callback) {
// TODO make sure to copy message into a local buffer
shims->log("Only single frame messages are supported");
- IsoTpHandle handle = {
+ IsoTpSendHandle handle = {
success: false,
- completed: true,
- type: ISOTP_HANDLE_SENDING
+ completed: true
};
// TODO need to set sending and receiving arbitration IDs separately if we
// can't always just add 0x8 (and I think we can't)
return handle;
}
-IsoTpHandle isotp_send(IsoTpShims* shims, const uint16_t arbitration_id,
+IsoTpSendHandle isotp_send(IsoTpShims* shims, const uint16_t arbitration_id,
const uint8_t payload[], uint16_t size,
IsoTpMessageSentHandler callback) {
IsoTpMessage message = {