Skip to content

Commit 4bb2b2f

Browse files
ddejeansandeepmistry
authored andcommitted
MCP2515: fix observe() method.
Fixes the observe() method to set the "listen only mode" bit in the control register instead of the "configuration mode" bit.
1 parent b7e40dd commit 4bb2b2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/MCP2515.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,8 @@ int MCP2515Class::filterExtended(long id, long mask)
353353

354354
int MCP2515Class::observe()
355355
{
356-
writeRegister(REG_CANCTRL, 0x80);
357-
if (readRegister(REG_CANCTRL) != 0x80) {
356+
writeRegister(REG_CANCTRL, 0x60);
357+
if (readRegister(REG_CANCTRL) != 0x60) {
358358
return 0;
359359
}
360360

0 commit comments

Comments
 (0)