summaryrefslogtreecommitdiff
path: root/vw-bap.h
blob: 02101048a3f8b03e905ce5b1441e802ba29c7435 (plain)
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
42
#ifndef __VW_BAP_H__
#define __VW_BAP_H__

#include <linux/can.h>


typedef unsigned char BAP_OpCode;
typedef unsigned char BAP_SubNode;
typedef unsigned char BAP_SubFunction;
typedef unsigned short BAP_FrameLen;


struct BAP_Frame {
	BAP_OpCode opcode;
	BAP_SubNode subnode;
	BAP_SubFunction function;
	BAP_FrameLen len;

	char data[4096];
};


struct BAP_RXer {
	struct BAP_Frame *mfchannel[8];
	BAP_FrameLen len_done[8];
};





void vw_bap_frame_dump(struct BAP_Frame *bap_frame);

struct BAP_Frame* vw_bap_handle_can_frame(struct BAP_RXer *bap, struct can_frame *frame);

struct BAP_RXer* vw_bap_alloc();
void vw_bap_free(struct BAP_RXer *bap);
void vw_bap_frame_free(struct BAP_Frame *bap_frame);



#endif