58 #ifndef FOXBMS__CAN_H_
59 #define FOXBMS__CAN_H_
69 #define CAN_TOTAL_NUMBER_OF_MESSAGE_BOXES (64u)
74 #define CAN_NR_OF_TX_MESSAGE_BOX (32u)
79 #define CAN_TICK_ms (10u)
161 #ifdef UNITY_UNIT_TEST
172 #if BS_CURRENT_SENSOR_PRESENT == true
#define BS_NR_OF_STRINGS
Number of parallel strings in the battery pack.
void TEST_CAN_ValidateConfiguredTxMessagePhase(void)
void TEST_CAN_ConfigureRxMailboxesForExtendedIdentifiers(void)
bool CAN_IsCurrentSensorCcPresent(uint8_t stringNumber)
get flag if CC message from current sensor is received.
void CAN_MainFunction(void)
Calls the functions to drive the CAN interface. Makes the CAN timing checks and sends the periodic me...
void TEST_CAN_SetCurrentSensorCcPresent(bool command, uint8_t stringNumber)
STD_RETURN_TYPE_e TEST_CAN_PeriodicTransmit(void)
void TEST_CAN_TxInterrupt(canBASE_t *pNode, uint32 messageBox)
CAN_STATE_s * TEST_CAN_GetCANState(void)
CAN_NODE_s * TEST_CAN_GetNodeConfigurationStructFromRegisterAddress(canBASE_t *pNodeRegister)
uint32_t TEST_CAN_CalculateCounterResetValue(void)
void TEST_CAN_RxInterrupt(canBASE_t *pNode, uint32 messageBox)
bool TEST_CAN_IsMessagePeriodElapsed(uint32_t ticksSinceStart, uint16_t messageIndex)
void TEST_CAN_SetCurrentSensorPresent(bool command, uint8_t stringNumber)
bool CAN_IsCurrentSensorEcPresent(uint8_t stringNumber)
get flag if EC message from current sensor is received
void TEST_CAN_CheckDatabaseNullPointer(CAN_SHIM_s canShim)
void CAN_SendMessagesFromQueue(void)
Reads messages from TX Queue and sends them via CAN.
void CAN_ReadRxBuffer(void)
Checks the data received per CAN. A receive buffer is used because CAN frames are received in an inte...
bool CAN_IsCurrentSensorPresent(uint8_t stringNumber)
set flag for presence of current sensor.
STD_RETURN_TYPE_e CAN_DataSend(CAN_NODE_s *pNode, uint32_t id, CAN_IDENTIFIER_TYPE_e idType, uint8 *pData)
Sends over CAN the data passed in parameters. This function goes over the message boxes and marks the...
void TEST_CAN_SetCurrentSensorEcPresent(bool command, uint8_t stringNumber)
void TEST_CAN_InitializeTransceiver(void)
void TEST_CAN_CheckCanTimingOfCurrentSensor(void)
void CAN_Initialize(void)
Enables the CAN transceiver.. This function sets th pins to enable the CAN transceiver....
void TEST_CAN_ValidateConfiguredTxMessagePeriod(void)
void CAN_EnablePeriodic(bool command)
Enables periodic sending per CAN. This is used to prevent sending uninitialized data per CAN (e....
void TEST_CAN_CheckCanTiming(void)
Headers for the configuration for the CAN module.