File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ MCP2515::ERROR MCP2515::setMode(const CANCTRL_REQOP_MODE mode)
183183
184184}
185185
186- MCP2515::ERROR MCP2515::setBitrate (const CAN_SPEED canSpeed, uint8_t canClock)
186+ MCP2515::ERROR MCP2515::setBitrate (const CAN_SPEED canSpeed, CAN_CLOCK canClock)
187187{
188188 ERROR error = setConfigMode ();
189189 if (error != ERROR_OK) {
Original file line number Diff line number Diff line change 157157#define MCP_20MHz_40kBPS_CFG2 (0xFF )
158158#define MCP_20MHz_40kBPS_CFG3 (0x87 )
159159
160- #define MCP_20MHZ 0
161- #define MCP_16MHZ 1
162- #define MCP_8MHZ 2
160+ enum CAN_CLOCK {
161+ MCP_20MHZ,
162+ MCP_16MHZ,
163+ MCP_8MHZ
164+ };
163165
164166enum CAN_SPEED {
165167 CAN_5KBPS,
@@ -439,7 +441,7 @@ class MCP2515
439441 ERROR setSleepMode ();
440442 ERROR setLoopbackMode ();
441443 ERROR setNormalMode ();
442- ERROR setBitrate (const CAN_SPEED canSpeed, const uint8_t canClock);
444+ ERROR setBitrate (const CAN_SPEED canSpeed, const CAN_CLOCK canClock);
443445 ERROR setFilterMask (const MASK num, const bool ext, const uint32_t ulData);
444446 ERROR setFilter (const RXF num, const bool ext, const uint32_t ulData);
445447 ERROR sendMessage (const TXBn txbn, const struct can_frame *frame);
You can’t perform that action at this time.
0 commit comments