Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/mbaum0193/CAN_BUS_Shield
Browse files Browse the repository at this point in the history
…into mbaum0193-master
  • Loading branch information
baorepo committed Mar 30, 2020
2 parents dc03e48 + 33bb082 commit 055c002
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mcp_can.cpp
Expand Up @@ -453,7 +453,11 @@ byte MCP_CAN::mcp2515_configRate(const byte canSpeed, const byte clock) {
cfg2 = MCP_16MHz_40kBPS_CFG2;
cfg3 = MCP_16MHz_40kBPS_CFG3;
break;

case (CAN_47KBPS):
cfg1 = MCP_16MHz_47kBPS_CFG1;
cfg2 = MCP_16MHz_47kBPS_CFG2;
cfg3 = MCP_16Mhz_47kBPS_CFG3;
break;
case (CAN_50KBPS):
cfg1 = MCP_16MHz_50kBPS_CFG1;
cfg2 = MCP_16MHz_50kBPS_CFG2;
Expand Down
5 changes: 5 additions & 0 deletions mcp_can_dfs.h
Expand Up @@ -405,6 +405,10 @@
#define MCP_8MHz_5kBPS_CFG2 (0xbf)
#define MCP_8MHz_5kBPS_CFG3 (0x07)

#define MCP_16MHz_47kBPS_CFG1 (0x06)
#define MCP_16MHz_47kBPS_CFG2 (0xBE)
#define MCP_16Mhz_47kBPS_CFG3 (0x07)

#define MCPDEBUG (0)
#define MCPDEBUG_TXBUF (0)
#define MCP_N_TXBUFFERS (3)
Expand Down Expand Up @@ -465,6 +469,7 @@
#define CAN_500KBPS 16
#define CAN_666KBPS 17
#define CAN_1000KBPS 18
#define CAN_47KBPS 19

#define CAN_OK (0)
#define CAN_FAILINIT (1)
Expand Down

0 comments on commit 055c002

Please sign in to comment.