Skip to content

Commit

Permalink
Version 2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pierremolinaro committed Oct 28, 2019
1 parent 8422638 commit 9ff510a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 21 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.0.0
version=2.0.1
author=Pierre Molinaro
maintainer=Pierre Molinaro <[email protected]>
sentence=Driver for MCP2517FD and MCP2518FD CAN Controller (CAN FD mode)
Expand Down
27 changes: 7 additions & 20 deletions src/ACAN2517FD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ uint32_t ACAN2517FD::begin (const ACAN2517FDSettings & inSettings,
#ifdef ARDUINO_ARCH_ESP32
attachInterrupt (itPin, inInterruptServiceRoutine, FALLING) ;
#else
attachInterrupt (itPin, inInterruptServiceRoutine, LOW) ;
attachInterrupt (itPin, inInterruptServiceRoutine, LOW) ; // Thank to Flole998
// mSPI.usingInterrupt (itPin) ; // usingInterrupt is not implemented in Arduino ESP32
#endif
}
Expand Down Expand Up @@ -1053,25 +1053,6 @@ uint32_t ACAN2517FD::readRegister32 (const uint16_t inRegisterAddress) {
return result ;
}

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

uint32_t ACAN2517FD::errorCounters (void) {
mSPI.beginTransaction (mSPISettings) ;
#ifdef ARDUINO_ARCH_ESP32
taskDISABLE_INTERRUPTS () ;
#else
noInterrupts () ;
#endif
const uint32_t result = readRegister32Assume_SPI_transaction (TREC_REGISTER) ;
#ifdef ARDUINO_ARCH_ESP32
taskENABLE_INTERRUPTS () ;
#else
interrupts () ;
#endif
mSPI.endTransaction () ;
return result ;
}

//······················································································································
// Current MCP2517FD Operation Mode
//······················································································································
Expand Down Expand Up @@ -1127,3 +1108,9 @@ void ACAN2517FD::reset2517FD (void) {

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

uint32_t ACAN2517FD::errorCounters (void) {
return readRegister32 (TREC_REGISTER) ;
}

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

0 comments on commit 9ff510a

Please sign in to comment.