57 #ifndef FOXBMS__CAN_H_
58 #define FOXBMS__CAN_H_
70 #define CAN0_NODE (canREG1)
75 #define CAN_NR_OF_TX_MESSAGE_BOX (32U)
78 #define CAN0_RX_BUFFER_LENGTH (32U)
83 #define CAN_TICK_MS (10U)
172 #ifdef UNITY_UNIT_TEST
struct CAN_STATE CAN_STATE_s
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...
bool CAN_IsCurrentSensorEcPresent(uint8_t stringNumber)
get flag if EC message from current sensor is received
STD_RETURN_TYPE_e CAN_DataSend(canBASE_t *pNode, uint32_t id, uint8 *pData)
Sends over CAN the data passed in parameters. This function goes over the messageboxes and marks the ...
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_TransmitBootMessage(void)
Transmit startup boot message.
struct CAN_RX_BUFFER CAN_RX_BUFFER_s
void CAN_Initialize(void)
Enables the CAN transceiver.. This function sets th pins to enable the CAN transceiver....
void CAN_EnablePeriodic(bool command)
Enables periodic sending per CAN. This is used to prevent sending uninitialized data per CAN (e....
Headers for the configuration for the CAN module.
enum STD_RETURN_TYPE STD_RETURN_TYPE_e
General macros and definitions for the whole platform.
CAN_BUFFERELEMENT_s * pWrite
CAN_BUFFERELEMENT_s * pRead
bool currentSensorECPresent[BS_NR_OF_STRINGS]
bool currentSensorCCPresent[BS_NR_OF_STRINGS]
bool currentSensorPresent[BS_NR_OF_STRINGS]