aboutsummaryrefslogtreecommitdiffstats
path: root/pcibx.h
blob: 10ee0efb32dd4e0107a1ee7cd0509f79b44066f1 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*

  Catalyst PCIBX32 PCI Extender control utility

  Copyright (c) 2006,2007 Michael Buesch <mb@bu3sch.de>

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 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 General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; see the file COPYING.  If not, write to
  the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
  Boston, MA 02110-1301, USA.

*/

#ifndef PCIBX_H_
#define PCIBX_H_

#include "utils.h"

#define VERSION		pcibx_stringify(VERSION_)

enum command_id {
	CMD_GLOB,
	CMD_UUT,
	CMD_PRINTBOARDID,
	CMD_PRINTFIRMREV,
	CMD_PRINTSTATUS,
	CMD_CLEARBITSTAT,
	CMD_AUX5,
	CMD_AUX33,
	CMD_MEASUREFREQ,
	CMD_MEASUREV25REF,
	CMD_MEASUREV12UUT,
	CMD_MEASUREV5UUT,
	CMD_MEASUREV33UUT,
	CMD_MEASUREV5AUX,
	CMD_MEASUREA5,
	CMD_MEASUREA12,
	CMD_MEASUREA33,
	CMD_FASTRAMP,
	CMD_RST,
	CMD_RSTDEFAULT,
	CMD_GETPME,
};

struct pcibx_command {
	enum command_id id;
	union {
		int boolean;
		double d;
	} u;
};

struct cmdline_args {
	int verbose;
	int sched;
	int cycle_delay;
	int nrcycle;

	const char *port;
	int is_PCI_1;

#define MAX_COMMAND	512
	struct pcibx_command commands[MAX_COMMAND];
	int nr_commands;
};
extern struct cmdline_args cmdargs;

#endif /* PCIBX_H_ */
bues.ch cgit interface