Skip to content

Commit

Permalink
Version 2.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
pierremolinaro committed Apr 27, 2020
1 parent 3ccca15 commit 7a47d94
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Binary file modified extras/acan2515.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=ACAN2515
version=2.0.3
version=2.0.4
author=Pierre Molinaro
maintainer=Pierre Molinaro <[email protected]>
sentence=Driver for MCP2515 CAN Controller
Expand Down
2 changes: 1 addition & 1 deletion src/ACANBuffer16.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class ACANBuffer16 {
private: CANMessage * mBuffer ;
private: uint16_t mSize ;
private: uint16_t mReadIndex ;
private: uint16_t mCount ;
private: volatile uint16_t mCount ;
private: uint16_t mPeakCount ; // > mSize if overflow did occur

//······················································································································
Expand Down
8 changes: 5 additions & 3 deletions src/CANMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// https://github.com/pierremolinaro/acan2515
// https://github.com/pierremolinaro/acan2517
// https://github.com/pierremolinaro/acan2517FD
//
//----------------------------------------------------------------------------------------------------------------------

#ifndef GENERIC_CAN_MESSAGE_DEFINED
Expand All @@ -25,9 +26,10 @@ class CANMessage {
public : uint8_t idx = 0 ; // This field is used by the driver
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
uint64_t data64 ; // Caution: subject to endianness
uint32_t data32 [2] ; // Caution: subject to endianness
uint16_t data16 [4] ; // Caution: subject to endianness
float dataFloat [2] ; // Caution: subject to endianness
uint8_t data [8] = {0, 0, 0, 0, 0, 0, 0, 0} ;
} ;
} ;
Expand Down

0 comments on commit 7a47d94

Please sign in to comment.