Stefan Sofijanić / CANlibrary

Dependents:   IntegrationCAN_03apr_FSRA2019

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers CANlibrary.h Source File

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 can_initTX(char);
00048 void can_msg_send();
00049 void can_msg_send_tick();
00050 void pack_data(uint16_t, char);
00051 void pack_data(char, char);
00052 
00053 #endif