Skip to content

Commit

Permalink
Version 2.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
pierremolinaro committed Oct 1, 2021
1 parent b6328ed commit 6ee34ab
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
Binary file modified extras/acan2517FD.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=ACAN2517FD
version=2.1.7
version=2.1.8
author=Pierre Molinaro
maintainer=Pierre Molinaro <Pierre.Molinaro@pcmolinaro.name>
sentence=Driver for MCP2517FD and MCP2518FD CAN Controller (CAN FD mode)
Expand Down
12 changes: 8 additions & 4 deletions src/CANFDMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,15 @@ class CANFDMessage {
public : uint8_t idx ; // This field is used by the driver
public : uint8_t len ; // Length of data (0 ... 64)
public : union {
uint64_t data64 [ 8] ; // Caution: subject to endianness
uint32_t data32 [16] ; // Caution: subject to endianness
uint16_t data16 [32] ; // Caution: subject to endianness
uint64_t data64 [ 8] ; // Caution: subject to endianness
int64_t data_s64 [ 8] ; // Caution: subject to endianness
uint32_t data32 [16] ; // Caution: subject to endianness
int32_t data_s32 [16] ; // Caution: subject to endianness
float dataFloat [16] ; // Caution: subject to endianness
uint8_t data [64] ;
uint16_t data16 [32] ; // Caution: subject to endianness
int16_t data_s16 [32] ; // Caution: subject to endianness
int8_t data_s8 [64] ;
uint8_t data [64] ;
} ;

//·············································································
Expand Down
10 changes: 7 additions & 3 deletions src/CANMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,14 @@ class CANMessage {
public : uint8_t len = 0 ; // Length of data (0 ... 8)
public : union {
uint64_t data64 ; // Caution: subject to endianness
uint32_t data32 [2] ; // Caution: subject to endianness
uint16_t data16 [4] ; // Caution: subject to endianness
int64_t data_s64 ; // Caution: subject to endianness
uint32_t data32 [2] ; // Caution: subject to endianness
int32_t data_s32 [2] ; // Caution: subject to endianness
float dataFloat [2] ; // Caution: subject to endianness
uint8_t data [8] = {0, 0, 0, 0, 0, 0, 0, 0} ;
uint16_t data16 [4] ; // Caution: subject to endianness
int16_t data_s16 [4] ; // Caution: subject to endianness
int8_t data_s8 [8] ;
uint8_t data [8] = {0, 0, 0, 0, 0, 0, 0, 0} ;
} ;
} ;

Expand Down

0 comments on commit 6ee34ab

Please sign in to comment.