Index: SystemComm.c =================================================================== diff -u -r3402723ffaf9fb1256d51fd23f4273ad7c087836 -rf4b440f1a4e29598b7726826d87a8cfb7885e214 --- SystemComm.c (.../SystemComm.c) (revision 3402723ffaf9fb1256d51fd23f4273ad7c087836) +++ SystemComm.c (.../SystemComm.c) (revision f4b440f1a4e29598b7726826d87a8cfb7885e214) @@ -76,7 +76,7 @@ // ********** private data ********** -static U08 lastCANPacketSent[ CAN_MESSAGE_PAYLOAD_SIZE ]; ///< Keep last packet sent on CAN bus in case we need to re-send. +static U08 lastCANPacketSent[ CAN_FRAME_PAYLOAD_SIZE ]; ///< Keep last packet sent on CAN bus in case we need to re-send. static CAN_MESSAGE_BOX_T lastCANPacketSentChannel = (CAN_MESSAGE_BOX_T)0; ///< Keep channel last packet was sent on CAN bus in case we need to re-send. static U32 lastCANPacketSentTimeStamp = 0; ///< Keep time last packet sent on CAN bus so we can timeout on transmission attempt. static U32 canXmitRetryCtr = 0; ///< Counter for CAN transmit retries. @@ -218,7 +218,7 @@ } else if ( TRUE == isCANBoxForRecv( srcCANBox ) ) { - U08 data[ CAN_MESSAGE_PAYLOAD_SIZE ]; + U08 data[ CAN_FRAME_PAYLOAD_SIZE ]; // Get CAN packet received on given CAN message box if ( FALSE != canIsRxMessageArrived( canREG1, srcCANBox ) ) @@ -229,7 +229,7 @@ if ( result != 0 ) { // Add CAN packet to appropriate comm buffer based on the message box it came in on (s/b same #) - addToCommBuffer( srcCANBox, data, CAN_MESSAGE_PAYLOAD_SIZE ); + addToCommBuffer( srcCANBox, data, CAN_FRAME_PAYLOAD_SIZE ); } } } @@ -315,7 +315,7 @@ // Search for next priority CAN packet to transmit for ( i = 0; i < NUM_OF_CAN_OUT_BUFFERS; i++ ) { - if ( numberOfBytesInCommBuffer( getOutBufferID( i ) ) >= CAN_MESSAGE_PAYLOAD_SIZE ) + if ( numberOfBytesInCommBuffer( getOutBufferID( i ) ) >= CAN_FRAME_PAYLOAD_SIZE ) { result = getOutBufferID( i ); break; // Found highest priority packet to transmit - we are done @@ -341,22 +341,22 @@ // If a buffer is found with a packet to transmit, get packet from buffer and transmit it if ( buffer != COMM_BUFFER_NOT_USED ) { - U08 data[ CAN_MESSAGE_PAYLOAD_SIZE ]; - U32 dataSize = getFromCommBuffer( buffer, data, CAN_MESSAGE_PAYLOAD_SIZE ); + U08 data[ CAN_FRAME_PAYLOAD_SIZE ]; + U32 dataSize = getFromCommBuffer( buffer, data, CAN_FRAME_PAYLOAD_SIZE ); CAN_MESSAGE_BOX_T mBox = buffer; // CAN message boxes and comm buffers are aligned // If there is another CAN packet to send, send it - if ( dataSize == CAN_MESSAGE_PAYLOAD_SIZE ) + if ( dataSize == CAN_FRAME_PAYLOAD_SIZE ) { // We are transmitting another packet - signal transmitter is busy signalCANXmitsInitiated(); // Remember packet data being transmitted here in case transmission fails and we need to re-send - memcpy( lastCANPacketSent, data, CAN_MESSAGE_PAYLOAD_SIZE ); + memcpy( lastCANPacketSent, data, CAN_FRAME_PAYLOAD_SIZE ); lastCANPacketSentChannel = mBox; lastCANPacketSentTimeStamp = getMSTimerCount(); if ( 0 != canTransmit( canREG1, mBox, data ) ) { - result = CAN_MESSAGE_PAYLOAD_SIZE; + result = CAN_FRAME_PAYLOAD_SIZE; } else {