![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
hgjh
Dependencies: BSP_DISCO_F469NIa EEPROM_DISCO_F469NI LCD_DISCO_F469NIa SD_DISCO_F469NI mbed
Fork of IntegrationCAN_28jun by
CAN_library.h@3:a06e417a5a2c, 2018-07-05 (annotated)
- Committer:
- nemanja1994
- Date:
- Thu Jul 05 20:18:32 2018 +0000
- Revision:
- 3:a06e417a5a2c
- Parent:
- 2:f54f01527ebb
fhgj;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
formulas | 0:38c3afd99aeb | 1 | #include "mbed.h" |
formulas | 2:f54f01527ebb | 2 | #include "SD_DISCO_F469NI.h" |
formulas | 2:f54f01527ebb | 3 | #include "EEPROM_DISCO_F469NI.h" |
formulas | 2:f54f01527ebb | 4 | |
formulas | 0:38c3afd99aeb | 5 | |
formulas | 0:38c3afd99aeb | 6 | //CAN Identificators |
formulas | 0:38c3afd99aeb | 7 | #define DTA_1 0x2000 |
formulas | 0:38c3afd99aeb | 8 | #define DTA_2 0x2001 |
formulas | 0:38c3afd99aeb | 9 | #define DTA_3 0x2002 |
formulas | 0:38c3afd99aeb | 10 | #define DTA_4 0x2003 |
formulas | 0:38c3afd99aeb | 11 | #define DTA_5 0x2004 |
formulas | 2:f54f01527ebb | 12 | #define DTA_6 0x2005 |
formulas | 0:38c3afd99aeb | 13 | // This IDs can be changed as they are our own IDs |
formulas | 2:f54f01527ebb | 14 | #define LVDT_FRONT 0x1006 |
formulas | 2:f54f01527ebb | 15 | #define LVDT_REAR 0x1007 |
formulas | 2:f54f01527ebb | 16 | #define BRAKES 0x1008 |
nemanja1994 | 3:a06e417a5a2c | 17 | #define DISTANCE 0x1009 |
formulas | 0:38c3afd99aeb | 18 | // If we add some other IDs in the vehicle add them here |
formulas | 0:38c3afd99aeb | 19 | |
formulas | 2:f54f01527ebb | 20 | #define DISTANCE_MEMORY_ADDR 3592960 //Start address in SD card memory reserved for Distance Statistics. |
formulas | 2:f54f01527ebb | 21 | |
formulas | 0:38c3afd99aeb | 22 | |
formulas | 0:38c3afd99aeb | 23 | //List of functions |
formulas | 2:f54f01527ebb | 24 | |
formulas | 2:f54f01527ebb | 25 | void CANMsgReceive(); // CAN RX Interrupt Function |
formulas | 0:38c3afd99aeb | 26 | |
formulas | 0:38c3afd99aeb | 27 | void UpdateInfo(); // Update info for DTA values |
formulas | 0:38c3afd99aeb | 28 | |
formulas | 0:38c3afd99aeb | 29 | uint16_t * AllocData(CANMessage msg); // Unpack CAN message |
formulas | 0:38c3afd99aeb | 30 | |
formulas | 2:f54f01527ebb | 31 | void InitDistanceMeter(uint16_t newData[4]); // Initialise Distance Meter |
formulas | 2:f54f01527ebb | 32 | |
formulas | 0:38c3afd99aeb | 33 | //Update values |
formulas | 0:38c3afd99aeb | 34 | void UpdateInfoDTA1(uint16_t newData[4]); // Update values for DTA1 message |
formulas | 0:38c3afd99aeb | 35 | void UpdateInfoDTA2(uint16_t newData[4]); // Update values for DTA2 message |
formulas | 0:38c3afd99aeb | 36 | void UpdateInfoDTA3(uint16_t newData[4]); // Update values for DTA3 message |
formulas | 0:38c3afd99aeb | 37 | void UpdateInfoDTA4(uint16_t newData[4]); // Update values for DTA4 message |
formulas | 0:38c3afd99aeb | 38 | void UpdateInfoDTA5(uint16_t newData[4]); // Update values for DTA5 message |
formulas | 0:38c3afd99aeb | 39 | void UpdateInfoDTA6(uint16_t newData[4]); // Update values for DTA6 message |
formulas | 2:f54f01527ebb | 40 | void UpdateMeterCounter(); |
formulas | 2:f54f01527ebb | 41 | void send(uint16_t ID, char dta[8]); |
formulas | 0:38c3afd99aeb | 42 | void UpdateInfoLVDTFront(uint16_t newData[4]); // Update values for LVDTFront message |
formulas | 0:38c3afd99aeb | 43 | void UpdateInfoLVDTRear(uint16_t newData[4]); // Update values for LVDTRear message |
formulas | 0:38c3afd99aeb | 44 | void UpdateInfoBrakes(uint16_t newData[4]); // Update values for Brakes message |