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.
Dependents: CAN_Library_Example Ekran CAN-library
CANlibrary.h
00001 #ifndef _CANLIBRARY_H_ 00002 #define _CANLIBRARY_H_ 00003 00004 #include "mbed.h" 00005 00006 /** 00007 00008 * Univerznalna CAN library, Datum: 27.2.2019. 00009 * 00010 * @Nikola Milenic @Marta Avramovic 00011 * CAN slanje i citanje poruka 00012 */ 00013 00014 /*//CAN Identificators 00015 #define DTA_1 0x2000 00016 #define DTA_2 0x2001 00017 #define DTA_3 0x2002 00018 #define DTA_4 0x2003 00019 #define DTA_5 0x2004 00020 #define DTA_6 0x2006 00021 // This IDs can be changed as they are our own IDs 00022 #define LVDT_FRONT 0x1000 00023 #define LVDT_REAR 0x1001 00024 #define BRAKES 0x1002 00025 // If we add some other IDs in the vehicle add td*/ 00026 #define TEST 14,3 00027 00028 00029 //List of functions 00030 00031 //----------------------------------------- 00032 /* inicijalizacija CAN prijema poruka */ 00033 //---------------------------------------- 00034 void can_initRX(); 00035 00036 //---------------------------------------- 00037 /* Funkcije Prijema */ 00038 //---------------------------------------- 00039 void can_msg_receive(); 00040 uint16_t get_data(char, char); 00041 bool check_flag(char); 00042 00043 //---------------------------------------- 00044 /* Funkcije Slanja */ 00045 //---------------------------------------- 00046 void canTX_set_Interval(float); 00047 void canTX_set_Interval_1(float); 00048 void canTX_set_Interval_2(float); 00049 void canTX_set_Interval_3(float); 00050 void can_initTX(char); 00051 void can_initTX1(char); 00052 void can_initTX2(char); 00053 void can_initTX3(char); 00054 void can_msg_send(); 00055 void can_msg_send1(); 00056 void can_msg_send2(); 00057 void can_msg_send3(); 00058 void can_msg_send_tick(); 00059 void can_msg_send_tick1(); 00060 void can_msg_send_tick2(); 00061 void can_msg_send_tick3(); 00062 void pack_data(uint16_t, char); 00063 void pack_data(char, char); 00064 void pack_data1(uint16_t, char); 00065 void pack_data1(char, char); 00066 void pack_data2(uint16_t, char); 00067 void pack_data2(char, char); 00068 void pack_data3(uint16_t, char); 00069 void pack_data3(char, char); 00070 00071 #endif
Generated on Thu Jul 14 2022 10:55:48 by
1.7.2