From 19bd3adc48e679f8e8bbfbe9a6083094d80bc37d Mon Sep 17 00:00:00 2001 From: Darryl Martin <80832451+DarrylMcoder@users.noreply.github.com> Date: Thu, 25 Apr 2024 21:36:42 -0400 Subject: [PATCH] Set correct bits for sleep mode --- src/MCP2515.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MCP2515.cpp b/src/MCP2515.cpp index 36c160d..3666810 100644 --- a/src/MCP2515.cpp +++ b/src/MCP2515.cpp @@ -375,8 +375,8 @@ int MCP2515Class::loopback() int MCP2515Class::sleep() { - writeRegister(REG_CANCTRL, 0x01); - if (readRegister(REG_CANCTRL) != 0x01) { + writeRegister(REG_CANCTRL, 0x20); + if (readRegister(REG_CANCTRL) != 0x20) { return 0; }