Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed LCD_DISCO_F469NIa SD_DISCO_F469NI BSP_DISCO_F469NIa EEPROM_DISCO_F469NI
CAN_library.h
00001 #include "mbed.h" 00002 #include "SD_DISCO_F469NI.h" 00003 #include "EEPROM_DISCO_F469NI.h" 00004 00005 00006 //CAN Identificators 00007 #define DTA_1 0x2000 00008 #define DTA_2 0x2001 00009 #define DTA_3 0x2002 00010 #define DTA_4 0x2003 00011 #define DTA_5 0x2004 00012 #define DTA_6 0x2005 00013 // This IDs can be changed as they are our own IDs 00014 #define LVDT_FRONT 0x1006 00015 #define LVDT_REAR 0x1007 00016 #define BRAKES 0x1008 00017 #define DISTANCE 0x1009 00018 // If we add some other IDs in the vehicle add them here 00019 00020 #define DISTANCE_MEMORY_ADDR 3592960 //Start address in SD card memory reserved for Distance Statistics. 00021 00022 //List of functions 00023 00024 void CANMsgReceive(); // CAN RX Interrupt Function 00025 00026 void UpdateInfo(); // Update info for DTA values 00027 00028 uint16_t * AllocData(CANMessage msg); // Unpack CAN message 00029 00030 void InitDistanceMeter(uint16_t newData[4]); // Initialise Distance Meter 00031 00032 //Update values 00033 void UpdateInfoDTA1(uint16_t newData[4]); // Update values for DTA1 message 00034 void UpdateInfoDTA2(uint16_t newData[4]); // Update values for DTA2 message 00035 void UpdateInfoDTA3(uint16_t newData[4]); // Update values for DTA3 message 00036 void UpdateInfoDTA4(uint16_t newData[4]); // Update values for DTA4 message 00037 void UpdateInfoDTA5(uint16_t newData[4]); // Update values for DTA5 message 00038 void UpdateInfoDTA6(uint16_t newData[4]); // Update values for DTA6 message 00039 //void UpdateMeterCounter(); //U izradi 00040 void send(uint16_t ID, char dta[8]); 00041 void UpdateInfoLVDTFront(uint16_t newData[4]); // Update values for LVDTFront message 00042 void UpdateInfoLVDTRear(uint16_t newData[4]); // Update values for LVDTRear message 00043 void UpdateInfoBrakes(uint16_t newData[4]); // Update values for Brakes message
Generated on Tue Jul 12 2022 18:36:17 by
