mirror of
https://github.com/Seeed-Studio/Seeed_Arduino_CAN.git
synced 2026-09-15 11:03:48 +00:00
Drop obsolete constant CAN_MAX_CHAR_IN_MESSAGE
This commit is contained in:
+2
-2
@@ -452,7 +452,7 @@ MCP_CAN::ERROR MCP_CAN::sendMessage(const TXBn txbn, const struct can_frame *fra
|
||||
|
||||
MCP_CAN::ERROR MCP_CAN::sendMessage(const struct can_frame *frame)
|
||||
{
|
||||
if (frame->can_dlc > CAN_MAX_CHAR_IN_MESSAGE) {
|
||||
if (frame->can_dlc > CAN_MAX_DLEN) {
|
||||
return ERROR_FAILTX;
|
||||
}
|
||||
|
||||
@@ -488,7 +488,7 @@ MCP_CAN::ERROR MCP_CAN::readMessage(const RXBn rxbn, struct can_frame *frame)
|
||||
}
|
||||
|
||||
uint8_t dlc = tbufdata[MCP_DLC] & DLC_MASK;
|
||||
if (dlc > CAN_MAX_CHAR_IN_MESSAGE) {
|
||||
if (dlc > CAN_MAX_DLEN) {
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user