Index: firmware/App/Services/SystemComm.h =================================================================== diff -u -ref12a43be17c4f1ed13302f81ca616a483850483 -r7d4711edd7b40cd3e29f43e766f79a8a09586fe9 --- firmware/App/Services/SystemComm.h (.../SystemComm.h) (revision ef12a43be17c4f1ed13302f81ca616a483850483) +++ firmware/App/Services/SystemComm.h (.../SystemComm.h) (revision 7d4711edd7b40cd3e29f43e766f79a8a09586fe9) @@ -1,14 +1,14 @@ /************************************************************************** * -* Copyright (c) 2019-2021 Diality Inc. - All Rights Reserved. +* Copyright (c) 2019-2024 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * @file SystemComm.h * -* @author (last) Quang Nguyen -* @date (last) 24-Aug-2020 +* @author (last) Michael Garthwaite +* @date (last) 17-Aug-2023 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -32,17 +32,17 @@ // ********** public definitions ********** -#define MESSAGE_SYNC_BYTE 0xA5 ///< Denali message syncronization byte. +#define MESSAGE_SYNC_BYTE 0xA5 ///< Denali message syncronization byte. -#define CAN_MESSAGE_PAYLOAD_SIZE 8 ///< CAN frame payload size (in bytes). +#define CAN_MESSAGE_PAYLOAD_SIZE 8 ///< CAN frame payload size (in bytes). -#define MSG_ID_ACK 0xFFFF ///< Denali message ID for acknowledging received messages (when required). -#define MSG_ACK_BIT 0x8000 ///< ACK bit in sequence number that indicates an ACK is required. -#define MAX_MSG_SEQ_NO 0x7FFF ///< Maximum sequence number for Denali message (then wraps to 1). -#define MIN_MSG_SEQ_NO 0x0001 ///< Minimum sequence number for Denali message. -#define MAX_ACK_MSG_SIZE ( sizeof( MESSAGE_WRAPPER_T ) + 1 + CAN_MESSAGE_PAYLOAD_SIZE ) ///< Maximum size (in bytes) of Denali message including full (wrapped) message + sync + any CAN padding) +#define MSG_ID_ACK_MESSAGE_THAT_REQUIRES_ACK 0xFFFF ///< Denali message ID for acknowledging received messages (when required). +#define MSG_ACK_BIT 0x8000 ///< ACK bit in sequence number that indicates an ACK is required. +#define MAX_MSG_SEQ_NO 0x7FFF ///< Maximum sequence number for Denali message (then wraps to 1). +#define MIN_MSG_SEQ_NO 0x0001 ///< Minimum sequence number for Denali message. +#define MAX_ACK_MSG_SIZE ( sizeof( MESSAGE_WRAPPER_T ) + 1 + CAN_MESSAGE_PAYLOAD_SIZE ) ///< Maximum size (in bytes) of Denali message including full (wrapped) message + sync + any CAN padding) -typedef COMM_BUFFER_T CAN_MESSAGE_BOX_T; ///< the CAN comm buffers align with the active CAN message boxes +typedef COMM_BUFFER_T CAN_MESSAGE_BOX_T; ///< the CAN comm buffers align with the active CAN message boxes // ********** public function prototypes ********** @@ -55,6 +55,10 @@ BOOL isHDCommunicating( void ); BOOL isDGOnlyCANNode( void ); BOOL addMsgToPendingACKList( MESSAGE_T *msg, COMM_BUFFER_T channel, U08 *msgData, U32 len ); +BOOL testSetHDCommunicationStatus( U32 value ); +BOOL testResetHDCommuncationStatus( void ); +BOOL testSetPendingACKOverride( U32 value ); +BOOL testResetPendingACKOverride( void ); /**@}*/