Drop obsolete constant CAN_MAX_CHAR_IN_MESSAGE

This commit is contained in:
Dmitry
2016-01-06 20:54:45 +03:00
parent e1d8e2341a
commit ad4c963c9e
2 changed files with 2 additions and 3 deletions
+2 -2
View File
@@ -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;
}
-1
View File
@@ -300,7 +300,6 @@ class MCP_CAN
MCP_RXB1DATA = 0x76
};
static const int CAN_MAX_CHAR_IN_MESSAGE = 8;
static const uint32_t SPI_CLOCK = 10000000; // 10MHz
static const int N_TXBUFFERS = 3;