BOROSOFTWAREAll work →
scantool/scantool_vag.c 70 lines
1/*
2 * !!! INCOMPLETE !!!!
3 *
4 * freediag - Vehicle Diagnostic Utility
5 *
6 *
7 * Copyright (C) 2001 Richard Almeida & Ibex Ltd ([email protected])
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 *
23 *************************************************************************
24 *
25 *
26 * Mostly ODBII Compliant Scan Tool (as defined in SAE J1978)
27 *
28 * CLI routines - vag subcommand
29 */
30
31
32#include <stddef.h>
33
34#include "libcli.h"
35
36#include "diag_vag.h"
37
38static enum cli_retval cmd_vag_help(int argc, char **argv);
39const struct cmd_tbl_entry vag_cmd_table[] = {
40 { "help", "help [command]", "Gives help for a command",
41 cmd_vag_help, 0, NULL},
42 { "?", "? [command]", "Gives help for a command",
43 cmd_vag_help, 0, NULL},
44
45 CLI_TBL_BUILTINS,
46 CLI_TBL_END
47};
48
49
50/*
51 * Table of english descriptions of the VW ECU addresses
52 */
53struct vw_id_info {
54 const int id;
55 const char *command;
56};
57
58const struct vw_id_info vw_ids[] = {
59 {DIAG_VAG_ECU_ENGINE, "Engine" },
60 {DIAG_VAG_ECU_GEARBOX, "Gearbox" },
61 {DIAG_VAG_ECU_ABS, "ABS" },
62 {DIAG_VAG_ECU_AIRBAGS, "Airbag" },
63 {DIAG_VAG_ECU_LOCKS, "Locking" },
64 {0, NULL},
65};
66
67static enum cli_retval cmd_vag_help(int argc, char **argv) {
68 return cli_help_basic(argc, argv, vag_cmd_table);
69}
70