#include <fcntl.h>
#define pipe(fds) _pipe(fds, 4096, _O_BINARY)
#endif
-#include "config.h"
#include "sigrok.h"
#include "sigrok-internal.h"
};
/* FIXME: Should not be global. */
-GIOChannel *channels[2];
+SR_PRIV GIOChannel *channels[2];
struct databag {
int pipe_fds[2];
static GThread *my_thread;
static int thread_running;
-static void hw_stop_acquisition(int device_index, gpointer session_data);
+static int hw_stop_acquisition(int device_index, gpointer session_data);
static int hw_init(const char *deviceinfo)
{
return SR_OK;
}
-static void hw_cleanup(void)
+static int hw_cleanup(void)
{
/* Nothing needed so far. */
+ return SR_OK;
}
static void *hw_get_device_info(int device_index, int device_info_id)
gettimeofday(&header->starttime, NULL);
header->samplerate = cur_samplerate;
header->num_logic_probes = NUM_PROBES;
- header->num_analog_probes = 0;
sr_session_bus(session_data, packet);
g_free(header);
g_free(packet);
return SR_OK;
}
-static void hw_stop_acquisition(int device_index, gpointer session_data)
+static int hw_stop_acquisition(int device_index, gpointer session_data)
{
/* Avoid compiler warnings. */
(void)device_index;
/* Stop generate thread. */
thread_running = 0;
+
+ return SR_OK;
}
-struct sr_device_plugin demo_plugin_info = {
+SR_PRIV struct sr_device_plugin demo_plugin_info = {
.name = "demo",
.longname = "Demo driver and pattern generator",
.api_version = 1,