summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Peplin <chris.peplin@rhubarbtech.com>2013-12-28 15:42:29 -0500
committerChristopher Peplin <chris.peplin@rhubarbtech.com>2013-12-28 15:42:29 -0500
commitfb3c14776f6eaaae69b6691ec912ecdcbce0cba7 (patch)
tree56f23ce784600494e111738137efeae94cafce0a
parentfd2f9c3b0d869e8243c871e66d31da62bc65887a (diff)
Draft work using more generic bitfield functions.
m---------deps/canutil10
-rw-r--r--src/isotp/receive.c4
2 files changed, 8 insertions, 6 deletions
diff --git a/deps/canutil b/deps/canutil
-Subproject 04a4db7d336ae2cae94ac3234086b22fbf1339f
+Subproject 0b00bb6c3c5df70317775efd12b6fff418ff454
diff --git a/src/isotp/receive.c b/src/isotp/receive.c
index b4978097..51562fcc 100644
--- a/src/isotp/receive.c
+++ b/src/isotp/receive.c
@@ -17,10 +17,12 @@ void isotp_receive_can_frame(IsoTpHandler* handler,
// TODO use CanMessage struct from canutil library - allocate payload buffer
// on stack, 8 bytes
- // TODO this function should receive uint64_t...
IsoTpProtocolControlInformation pci = (IsoTpProtocolControlInformation)
getBitField(data, 0, 4, false);
+ IsoTpProtocolControlInformation pci = (IsoTpProtocolControlInformation)
+ getNibble(0, data, 64, LITTE_ENDIAN);
+
// TODO this is messed up! need a better API for grabbing bytes
uint8_t payload_length = getBitField(data, 4, 4, false);
uint8_t payload[payload_length];