gg
Fork of IntegrationCAN-novo by
Diff: CAN_library.h
- Revision:
- 0:38c3afd99aeb
- Child:
- 5:53d7dbb8503c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CAN_library.h Wed May 16 14:48:37 2018 +0000 @@ -0,0 +1,33 @@ +#include "mbed.h" + +//CAN Identificators +#define DTA_1 0x2000 +#define DTA_2 0x2001 +#define DTA_3 0x2002 +#define DTA_4 0x2003 +#define DTA_5 0x2004 +#define DTA_6 0x2006 +// This IDs can be changed as they are our own IDs +#define LVDT_FRONT 0x1000 +#define LVDT_REAR 0x1001 +#define BRAKES 0x1002 +// If we add some other IDs in the vehicle add them here + + +//List of functions +void CANMsgReceive(); // CAN RX Interrupt Function + +void UpdateInfo(); // Update info for DTA values + +uint16_t * AllocData(CANMessage msg); // Unpack CAN message + +//Update values +void UpdateInfoDTA1(uint16_t newData[4]); // Update values for DTA1 message +void UpdateInfoDTA2(uint16_t newData[4]); // Update values for DTA2 message +void UpdateInfoDTA3(uint16_t newData[4]); // Update values for DTA3 message +void UpdateInfoDTA4(uint16_t newData[4]); // Update values for DTA4 message +void UpdateInfoDTA5(uint16_t newData[4]); // Update values for DTA5 message +void UpdateInfoDTA6(uint16_t newData[4]); // Update values for DTA6 message +void UpdateInfoLVDTFront(uint16_t newData[4]); // Update values for LVDTFront message +void UpdateInfoLVDTRear(uint16_t newData[4]); // Update values for LVDTRear message +void UpdateInfoBrakes(uint16_t newData[4]); // Update values for Brakes message \ No newline at end of file