03.04.2019. revision - minor tweaks and changes

Dependents:   IntegrationCAN_03apr_FSRA2019

Committer:
Stefan_Sofijanic
Date:
Tue Apr 02 19:39:53 2019 +0000
Revision:
1:ad6ce1030851
Parent:
0:9cbaaaf1768f
Nema razmaka

Who changed what in which revision?

UserRevisionLine numberNew contents of line
renemagrit 0:9cbaaaf1768f 1 #ifndef _CANLIBRARY_H_
renemagrit 0:9cbaaaf1768f 2 #define _CANLIBRARY_H_
renemagrit 0:9cbaaaf1768f 3
renemagrit 0:9cbaaaf1768f 4 #include "mbed.h"
renemagrit 0:9cbaaaf1768f 5
renemagrit 0:9cbaaaf1768f 6 /**
renemagrit 0:9cbaaaf1768f 7
renemagrit 0:9cbaaaf1768f 8 * Univerznalna CAN library, Datum: 27.2.2019.
renemagrit 0:9cbaaaf1768f 9 *
renemagrit 0:9cbaaaf1768f 10 * @Nikola Milenic @Marta Avramovic
renemagrit 0:9cbaaaf1768f 11 * CAN slanje i citanje poruka
renemagrit 0:9cbaaaf1768f 12 */
renemagrit 0:9cbaaaf1768f 13
renemagrit 0:9cbaaaf1768f 14 /*//CAN Identificators
renemagrit 0:9cbaaaf1768f 15 #define DTA_1 0x2000
renemagrit 0:9cbaaaf1768f 16 #define DTA_2 0x2001
renemagrit 0:9cbaaaf1768f 17 #define DTA_3 0x2002
renemagrit 0:9cbaaaf1768f 18 #define DTA_4 0x2003
renemagrit 0:9cbaaaf1768f 19 #define DTA_5 0x2004
renemagrit 0:9cbaaaf1768f 20 #define DTA_6 0x2006
renemagrit 0:9cbaaaf1768f 21 // This IDs can be changed as they are our own IDs
renemagrit 0:9cbaaaf1768f 22 #define LVDT_FRONT 0x1000
renemagrit 0:9cbaaaf1768f 23 #define LVDT_REAR 0x1001
renemagrit 0:9cbaaaf1768f 24 #define BRAKES 0x1002
renemagrit 0:9cbaaaf1768f 25 // If we add some other IDs in the vehicle add td*/
renemagrit 0:9cbaaaf1768f 26 #define TEST 14,3
renemagrit 0:9cbaaaf1768f 27
renemagrit 0:9cbaaaf1768f 28
renemagrit 0:9cbaaaf1768f 29 //List of functions
renemagrit 0:9cbaaaf1768f 30
renemagrit 0:9cbaaaf1768f 31 //-----------------------------------------
renemagrit 0:9cbaaaf1768f 32 /* inicijalizacija CAN prijema poruka */
renemagrit 0:9cbaaaf1768f 33 //----------------------------------------
renemagrit 0:9cbaaaf1768f 34 void can_initRX();
renemagrit 0:9cbaaaf1768f 35
renemagrit 0:9cbaaaf1768f 36 //----------------------------------------
renemagrit 0:9cbaaaf1768f 37 /* Funkcije Prijema */
renemagrit 0:9cbaaaf1768f 38 //----------------------------------------
renemagrit 0:9cbaaaf1768f 39 void can_msg_receive();
renemagrit 0:9cbaaaf1768f 40 uint16_t get_data(char, char);
renemagrit 0:9cbaaaf1768f 41 bool check_flag(char);
renemagrit 0:9cbaaaf1768f 42
renemagrit 0:9cbaaaf1768f 43 //----------------------------------------
renemagrit 0:9cbaaaf1768f 44 /* Funkcije Slanja */
renemagrit 0:9cbaaaf1768f 45 //----------------------------------------
renemagrit 0:9cbaaaf1768f 46 void canTX_set_Interval(float);
renemagrit 0:9cbaaaf1768f 47 void can_initTX(char);
renemagrit 0:9cbaaaf1768f 48 void can_msg_send();
renemagrit 0:9cbaaaf1768f 49 void can_msg_send_tick();
renemagrit 0:9cbaaaf1768f 50 void pack_data(uint16_t, char);
renemagrit 0:9cbaaaf1768f 51 void pack_data(char, char);
renemagrit 0:9cbaaaf1768f 52
renemagrit 0:9cbaaaf1768f 53 #endif