From fb3c14776f6eaaae69b6691ec912ecdcbce0cba7 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 28 Dec 2013 15:42:29 -0500 Subject: Draft work using more generic bitfield functions. --- src/isotp/receive.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/isotp') 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]; -- cgit 1.2.3-korg