summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristopher Peplin <chris.peplin@rhubarbtech.com>2014-02-27 15:53:19 -0500
committerChristopher Peplin <chris.peplin@rhubarbtech.com>2014-02-27 15:53:19 -0500
commita8f4bf42ee73ede0d2d3ddaf6c312c756c042a6b (patch)
treec41ffae2a8e08a238d5ab21fe594782317d41208 /src
parentc01a88ba1e56d455c7187a52a5e244500a0d6b0f (diff)
Increase size of arb ID to uint32_t to fit extended IDs.
Diffstat (limited to 'src')
-rw-r--r--src/isotp/isotp_types.h4
-rw-r--r--src/isotp/receive.c4
-rw-r--r--src/isotp/receive.h6
3 files changed, 7 insertions, 7 deletions
diff --git a/src/isotp/isotp_types.h b/src/isotp/isotp_types.h
index 5a40733f..9d05980a 100644
--- a/src/isotp/isotp_types.h
+++ b/src/isotp/isotp_types.h
@@ -38,7 +38,7 @@ extern "C" {
* size - The size of the payload. The size will be 0 if there is no payload.
*/
typedef struct {
- const uint16_t arbitration_id;
+ const uint32_t arbitration_id;
uint8_t payload[OUR_MAX_ISO_TP_MESSAGE_SIZE];
uint16_t size;
bool completed;
@@ -60,7 +60,7 @@ typedef void (*LogShim)(const char* message, ...);
*
* Returns true if the CAN message was sent successfully.
*/
-typedef bool (*SendCanMessageShim)(const uint16_t arbitration_id,
+typedef bool (*SendCanMessageShim)(const uint32_t arbitration_id,
const uint8_t* data, const uint8_t size);
/* Public: The type signature for a... TODO, not used yet.
diff --git a/src/isotp/receive.c b/src/isotp/receive.c
index 792afda9..2dc380bc 100644
--- a/src/isotp/receive.c
+++ b/src/isotp/receive.c
@@ -14,7 +14,7 @@ bool isotp_handle_single_frame(IsoTpReceiveHandle* handle, IsoTpMessage* message
}
IsoTpReceiveHandle isotp_receive(IsoTpShims* shims,
- const uint16_t arbitration_id, IsoTpMessageReceivedHandler callback) {
+ const uint32_t arbitration_id, IsoTpMessageReceivedHandler callback) {
IsoTpReceiveHandle handle = {
success: false,
completed: false,
@@ -26,7 +26,7 @@ IsoTpReceiveHandle isotp_receive(IsoTpShims* shims,
}
IsoTpMessage isotp_continue_receive(IsoTpShims* shims,
- IsoTpReceiveHandle* handle, const uint16_t arbitration_id,
+ IsoTpReceiveHandle* handle, const uint32_t arbitration_id,
const uint8_t data[], const uint8_t size) {
IsoTpMessage message = {
arbitration_id: arbitration_id,
diff --git a/src/isotp/receive.h b/src/isotp/receive.h
index 1dfd6f6d..6788914a 100644
--- a/src/isotp/receive.h
+++ b/src/isotp/receive.h
@@ -25,7 +25,7 @@ typedef struct {
bool success;
// Private
- uint16_t arbitration_id;
+ uint32_t arbitration_id;
IsoTpMessageReceivedHandler message_received_callback;
uint16_t timeout_ms;
// timeout_ms: ISO_TP_DEFAULT_RESPONSE_TIMEOUT,
@@ -52,7 +52,7 @@ typedef struct {
* when the message is completely sent.
*/
IsoTpReceiveHandle isotp_receive(IsoTpShims* shims,
- const uint16_t arbitration_id, IsoTpMessageReceivedHandler callback);
+ const uint32_t arbitration_id, IsoTpMessageReceivedHandler callback);
/* Public: Continue to receive a an ISO-TP message, based on a freshly
* received CAN message.
@@ -76,7 +76,7 @@ IsoTpReceiveHandle isotp_receive(IsoTpShims* shims,
* handle. Keep passing the same handle to this function when CAN frames arrive.
*/
IsoTpMessage isotp_continue_receive(IsoTpShims* shims,
- IsoTpReceiveHandle* handle, const uint16_t arbitration_id,
+ IsoTpReceiveHandle* handle, const uint32_t arbitration_id,
const uint8_t data[], const uint8_t size);
#ifdef __cplusplus