-
Notifications
You must be signed in to change notification settings - Fork 0
/
com_can.h
42 lines (34 loc) · 837 Bytes
/
com_can.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* File: comm_can.h
* Author: Ahmed
*
* Created on March 3, 2017, 7:20 PM
*/
#ifndef COM_CAN_H
#define COM_CAN_H
#ifdef __cplusplus
extern "C" {
#endif
#define NODE_NR 0x01 // assigned by a dip switch in the future
#define NODE_TYPE 0x02 // for master = 0x01
// for liquid level sensor = 0x02
// for pressure sensor = 0x03
// CAN ID = (NODE_TYPE<<8) | (NODE_ID)
typedef struct
{
uint8_t node_nr; // node number
uint8_t node_type; // type of sensor: liquid level, pressure...etc
uint8_t node_data_size;
uint8_t * node_data_ptr;
}Node_t;
//tCANMsgObject RTRMessage;
void ComInit(void);
/*
void CanCom_Init(void);
void TransmitData(void);
void ReceiveData( Node_t * node )
*/
#ifdef __cplusplus
}
#endif
#endif /* COMM_CAN_H */