Skip to content

Commit 7d08979

Browse files
committed
delete src/mcp2518fd_can_def.h
1 parent 0a18839 commit 7d08979

File tree

6 files changed

+862
-907
lines changed

6 files changed

+862
-907
lines changed

src/mcp2515_can_dfs.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,22 @@
476476
#define CAN_SENDMSGTIMEOUT (7)
477477
#define CAN_FAIL (0xff)
478478

479+
480+
// #define CAN_OK (0)
481+
// #define CAN_FAILINIT (1)
482+
// #define CAN_FAILTX (2)
483+
// #define CAN_MSGAVAIL (3)
484+
#define CAN_NOMSG (4)
485+
#define CAN_CTRLERROR (5)
486+
#define CAN_GETTXBFTIMEOUT (6)
487+
#define CAN_SENDMSGTIMEOUT (7)
488+
#define CAN_FAIL (0xff)
489+
490+
491+
492+
493+
494+
479495
#define CAN_MAX_CHAR_IN_MESSAGE (8)
480496

481497
#endif

src/mcp2518fd_can.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ byte mcp2518fd::begin(byte speedset,const byte clockset)
103103
SPI.begin();
104104
byte res = mcp2518fd_init(speedset,clockset);
105105

106-
return ((res == MCP2518fd_OK) ? CAN_OK : CAN_FAILINIT);
106+
return res;
107107
}
108108

109109
/*********************************************************************************************************

src/mcp2518fd_can.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,10 @@
44
#define _MCP2518FD_H_
55

66
#include "mcp_can.h"
7-
#include "mcp2518fd_can_def.h"
87
#include "mcp2518fd_can_dfs.h"
98
#include <Arduino.h>
109
#include <SPI.h>
1110

12-
#define MCP2518fd_OK (0)
13-
#define MCP2518fd_FAIL (1)
14-
#define CAN_OK (0)
15-
#define CAN_FAILINIT (1)
16-
#define CAN_FAILTX (2)
17-
#define CAN_MSGAVAIL (3)
1811

1912
// *****************************************************************************
2013
// *****************************************************************************

0 commit comments

Comments
 (0)