]> sigrok.org Git - libsigrok.git/blob - hardware/fx2lafw/fx2lafw.c
fx2lafw: Added empty hardware module for fx2lafw
[libsigrok.git] / hardware / fx2lafw / fx2lafw.c
1 /*
2  * This file is part of the sigrok project.
3  *
4  * Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18  */
19
20 #include <stdio.h>
21 #include <stdlib.h>
22
23 #include "config.h"
24 #include "sigrok.h"
25 #include "sigrok-internal.h"
26 #include "fx2lafw.h"
27
28
29 /*
30  * API callbacks
31  */
32
33 static int hw_init(const char *deviceinfo)
34 {
35         (void)deviceinfo;
36         return 0;
37 }
38
39 static int hw_dev_open(int device_index)
40 {
41         (void)device_index;
42         return SR_OK;
43 }
44
45 static int hw_dev_close(int device_index)
46 {
47         (void)device_index;
48         return SR_OK;
49 }
50
51 static int hw_cleanup(void)
52 {
53         return SR_OK;
54 }
55
56 static void *hw_dev_info_get(int device_index, int device_info_id)
57 {
58         (void)device_index;
59         (void)device_info_id;
60         return NULL;
61 }
62
63 static int hw_dev_status_get(int device_index)
64 {
65         (void)device_index;
66         return SR_ST_NOT_FOUND;
67 }
68
69 static int *hw_hwcap_get_all(void)
70 {
71         return NULL;
72 }
73
74 static int hw_dev_config_set(int dev_index, int capability, void *value)
75 {
76         (void)dev_index;
77         (void)capability;
78         (void)value;
79         return SR_OK;
80 }
81
82 static int hw_dev_acquisition_start(int dev_index, gpointer session_data)
83 {
84         (void)dev_index;
85         (void)session_data;
86         return SR_OK;
87 }
88
89 /* This stops acquisition on ALL devices, ignoring device_index. */
90 static int hw_dev_acquisition_stop(int dev_index, gpointer session_data)
91 {
92         (void)dev_index;
93         (void)session_data;
94         return SR_OK;
95 }
96
97 SR_PRIV struct sr_dev_plugin fx2lafw_plugin_info = {
98         .name = "fx2lafw",
99         .longname = "fx2lafw",
100         .api_version = 1,
101         .init = hw_init,
102         .cleanup = hw_cleanup,
103         .dev_open = hw_dev_open,
104         .dev_close = hw_dev_close,
105         .dev_info_get = hw_dev_info_get,
106         .dev_status_get = hw_dev_status_get,
107         .hwcap_get_all = hw_hwcap_get_all,
108         .dev_config_set = hw_dev_config_set,
109         .dev_acquisition_start = hw_dev_acquisition_start,
110         .dev_acquisition_stop = hw_dev_acquisition_stop,
111 };