Skip to content

Commit

Permalink
Merge pull request #18 from Flole998/diagInfo
Browse files Browse the repository at this point in the history
Add option to read the diagnostic registers
  • Loading branch information
pierremolinaro authored Oct 3, 2020
2 parents d9cafc2 + d9fddd3 commit d9530f0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ACAN2517FD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1167,3 +1167,8 @@ uint32_t ACAN2517FD::errorCounters (void) {

//----------------------------------------------------------------------------------------------------------------------

uint32_t ACAN2517FD::diagInfos(void) {
return readRegister32(BDIAG1_REGISTER);
}

//----------------------------------------------------------------------------------------------------------------------
6 changes: 6 additions & 0 deletions src/ACAN2517FD.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ class ACAN2517FD {
//······················································································································

public: uint32_t errorCounters (void) ;

//······················································································································
// Get diagnostic information
//······················································································································

public: uint32_t diagInfos (void) ;

//······················································································································
// Current MCP2517FD Operation Mode
Expand Down

0 comments on commit d9530f0

Please sign in to comment.