-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathsardine_prot.h
51 lines (40 loc) · 1.35 KB
/
sardine_prot.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
42
43
44
45
46
47
48
49
50
51
/* Sardine CAN (Open Source J2534 device) - Arduino firmware - version 0.4 alpha
**
** Copyright (C) 2012 Olaf @ Hacking Volvo blog (hackingvolvo.blogspot.com)
** Author: Olaf <[email protected]>
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU Lesser General Public License as published
** by the Free Software Foundation, either version 3 of the License, or (at
** your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
** Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License along with this program; if not, <http://www.gnu.org/licenses/>.
**
*/
#ifndef _SARDINE_PROT_H
#define _SARDINE_PROT_H
#include <mcp2515.h>
namespace SardineProtocol
{
#define MAX_CHUNK_SIZE 16
enum param_type { NOTHING, VALUE, STRING, DATA_CHUNK };
typedef struct {
int type;
char * str;
unsigned long value;
unsigned char data[MAX_CHUNK_SIZE];
int datalen;
} my_param;
int init_protocol();
void dispatch_CAN_message( tCAN * message );
boolean handle_host_message( char * cmd_buf );
void module_init_failed();
void module_init_success();
}
#endif