File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ MCP2515::ERROR MCP2515::reset(void)
4747 setRegister (MCP_RXB0CTRL, 0 );
4848 setRegister (MCP_RXB1CTRL, 0 );
4949
50- setRegister (MCP_CANINTE, CANINTF_RX0IF | CANINTF_RX1IF | CANINTF_ERRIF);
50+ setRegister (MCP_CANINTE, CANINTF_RX0IF | CANINTF_RX1IF | CANINTF_ERRIF | CANINTF_MERRF );
5151
5252 modifyRegister (MCP_RXB0CTRL,
5353 RXBnCTRL_RXM_MASK | RXB0CTRL_BUKT,
@@ -532,3 +532,10 @@ void MCP2515::clearRXnOVR(void)
532532 }
533533
534534}
535+
536+ void MCP2515::clearMERR ()
537+ {
538+ // modifyRegister(MCP_EFLG, EFLG_RX0OVR | EFLG_RX1OVR, 0);
539+ // clearInterrupts();
540+ modifyRegister (MCP_CANINTF, CANINTF_MERRF, 0 );
541+ }
Original file line number Diff line number Diff line change @@ -372,7 +372,7 @@ class MCP2515
372372 void clearTXInterrupts (void );
373373 uint8_t getStatus (void );
374374 void clearRXnOVR (void );
375-
375+ void clearMERR ();
376376};
377377
378378#endif
You can’t perform that action at this time.
0 commit comments