OpenCores
URL https://opencores.org/ocsvn/gpib_controller/gpib_controller/trunk

Subversion Repositories gpib_controller

[/] [gpib_controller/] [trunk/] [prototype_1/] [PC_software/] [test_src/] [main.c] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 Andrewski
/*
2
*This file is part of fpga_gpib_controller.
3
*
4
* Fpga_gpib_controller is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, either version 3 of the License, or
7
* (at your option) any later version.
8
*
9
* Fpga_gpib_controller is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with Fpga_gpib_controller.  If not, see <http://www.gnu.org/licenses/>.
16
* Author: Andrzej Paluch
17
*/
18 3 Andrewski
#include <stdio.h>
19
#include <stdlib.h>
20
#include <string.h>
21
#include <unistd.h>
22
 
23
#include "GpibRegAccess.h"
24
 
25
 
26
#define CHECK(x) if(!(x)) goto error;
27
 
28
extern int gpibExplorerMain(int argc, char* argv[]);
29
extern int rawRegAccessMain(int argc, char* argv[]);
30
extern int listenOnlyMain(int argc, char* argv[]);
31
 
32
 
33
int main(int argc, char *argv[]) {
34
 
35
        if(argc == 2)
36
        {
37
                if(strstr(argv[1], "ge"))
38
                {
39
                        return gpibExplorerMain(argc, argv);
40
                } else if(strstr(argv[1], "rra"))
41
                {
42
                        return rawRegAccessMain(argc, argv);
43
                } else if(strstr(argv[1], "lo"))
44
                {
45
                        return listenOnlyMain(argc, argv);
46
                }
47
        }
48
 
49
        return 1;
50
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.